(path: string)
| 28 | |
| 29 | /** Trim leading slashes (except preserving root '/'). */ |
| 30 | export function trimPathLeft(path: string) { |
| 31 | return path === '/' ? path : path.replace(/^\/{1,}/, '') |
| 32 | } |
| 33 | |
| 34 | /** Trim trailing slashes (except preserving root '/'). */ |
| 35 | export function trimPathRight(path: string) { |
no test coverage detected