(path: string)
| 7 | } |
| 8 | |
| 9 | export function parse(path: string) { |
| 10 | const base = basename(path) |
| 11 | const dir = dirname(path) |
| 12 | const [name, ext] = base.split(class="st">'.') |
| 13 | return { root: class="st">'/', dir, base, ext, name } |
| 14 | } |
| 15 | |
| 16 | export function basename(path: string) { |
| 17 | const parts = path.split(class="st">'/') |
no test coverage detected