remove-trailing-slash.d.ts 259 B

12345678
  1. /**
  2. * Removes the trailing slash for a given route or page path. Preserves the
  3. * root page. Examples:
  4. * - `/foo/bar/` -> `/foo/bar`
  5. * - `/foo/bar` -> `/foo/bar`
  6. * - `/` -> `/`
  7. */
  8. export declare function removeTrailingSlash(route: string): string;