(value: string)
| 49 | } |
| 50 | |
| 51 | export function trimTrailingPathSeparators(value: string): string { |
| 52 | if (value === '/' || /^[A-Za-z]:\\$/.test(value)) return value; |
| 53 | return isWindowsDrivePath(value) ? value.replace(/\\+$/g, '') : value.replace(/\/+$/g, ''); |
| 54 | } |
| 55 | |
| 56 | function comparablePath(value: string): string { |
| 57 | const trimmed = trimTrailingPathSeparators(value); |
no test coverage detected