(path: string)
| 22 | |
| 23 | /** Remove repeated slashes from a path string. */ |
| 24 | export function cleanPath(path: string) { |
| 25 | // remove double slashes |
| 26 | return path.replace(/\/{2,}/g, '/') |
| 27 | } |
| 28 | |
| 29 | /** Trim leading slashes (except preserving root '/'). */ |
| 30 | export function trimPathLeft(path: string) { |
no test coverage detected