(path: string)
| 16 | const isWindowsPath = (value: string) => value[1] === ":" || value.startsWith("\\\\") |
| 17 | |
| 18 | export const pathKey = (path: string) => { |
| 19 | const value = isWindowsPath(path) ? path.replaceAll("\\", "/") : path |
| 20 | const trimmed = trimTrailingSlashes(value) |
| 21 | if (!trimmed && value.startsWith("/")) return "/" as PathKey |
| 22 | if (isDrive(trimmed)) return `${trimmed}/` as PathKey |
| 23 | return trimmed as PathKey |
| 24 | } |
no test coverage detected