(path: Path)
| 56 | * @returns {Path[]} An array of path fragments. |
| 57 | */ |
| 58 | export function split(path: Path): PathFragment[] { |
| 59 | const fragments = path.split(NormalizedSep).map((x) => fragment(x)); |
| 60 | if (fragments.at(-1)?.length === 0) { |
| 61 | fragments.pop(); |
| 62 | } |
| 63 | |
| 64 | return fragments; |
| 65 | } |
| 66 | |
| 67 | /** |
| 68 | * |