(path: string)
| 39 | } |
| 40 | |
| 41 | export function decodeVfsPathSegments(path: string): string[] { |
| 42 | const trimmed = path.trim().replace(/^\/+|\/+$/g, '') |
| 43 | if (!trimmed) return [] |
| 44 | return trimmed.split('/').map(decodeVfsSegment) |
| 45 | } |
| 46 | |
| 47 | export function canonicalizeVfsPath(path: string): string { |
| 48 | return encodeVfsPathSegments(decodeVfsPathSegments(path)) |
no test coverage detected