(path: string)
| 38 | } |
| 39 | |
| 40 | export function basenamePath(path: string): string { |
| 41 | const normalized = normalizePath(path) |
| 42 | if (normalized === '/') { |
| 43 | return '' |
| 44 | } |
| 45 | |
| 46 | return normalized.split('/').pop() ?? '' |
| 47 | } |
| 48 | |
| 49 | export function dirnamePath(path: string): string { |
| 50 | const normalized = normalizePath(path) |
no test coverage detected