UNPKG

compare-path

Version:

An easy-to-use package to detect if two URLs match each other by comparing their abstract paths

12 lines 399 B
/** * Cleans a URL path by: * * - Trimming leading and trailing whitespace * - Removing leading and trailing slashes * - Replacing multiple consecutive slashes with a single slash * * @param path - The raw path string (e.g., '///users//1///') * @returns The cleaned path (e.g., 'users/1') */ export declare const cleanPath: (path: string) => string; //# sourceMappingURL=clean-path.d.ts.map