(path: string)
| 2 | |
| 3 | /** basename of an absolute path (last non-empty segment), defaulting to the path. */ |
| 4 | export function basename(path: string): string { |
| 5 | const parts = path.split('/').filter(Boolean); |
| 6 | return parts.length > 0 ? parts[parts.length - 1]! : path; |
| 7 | } |
no outgoing calls
no test coverage detected