NeahOpti/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.d.ts
2025-04-22 12:49:37 +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;