Files
novarix.uk/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.d.ts
T
Kismet Hasanaj 39a8a128be including-modules
2026-05-03 00:14:08 +02:00

9 lines
259 B
TypeScript

/**
* Removes the trailing slash for a given route or page path. Preserves the
* root page. Examples:
* - `/foo/bar/` -> `/foo/bar`
* - `/foo/bar` -> `/foo/bar`
* - `/` -> `/`
*/
export declare function removeTrailingSlash(route: string): string;