(p: string)
| 5 | * This handles cross-platform path comparison issues. |
| 6 | */ |
| 7 | export function normalizePath(p: string): string { |
| 8 | // Remove trailing slashes |
| 9 | let normalized = p.replace(/[/\\]+$/, "") |
| 10 | // Convert to consistent separators using path.normalize |
| 11 | normalized = path.normalize(normalized) |
| 12 | return normalized |
| 13 | } |
| 14 | |
| 15 | /** |
| 16 | * Compare two paths for equality, handling: |
no test coverage detected