(...paths: Array<string | undefined>)
| 27 | } |
| 28 | |
| 29 | export function joinPaths(...paths: Array<string | undefined>): string { |
| 30 | const filtered = paths.filter( |
| 31 | (path): path is string => typeof path === 'string' && path.length > 0, |
| 32 | ) |
| 33 | if (!filtered.length) { |
| 34 | return '.' |
| 35 | } |
| 36 | |
| 37 | return normalizePath(filtered.join('/')) |
| 38 | } |
| 39 | |
| 40 | export function basenamePath(path: string): string { |
| 41 | const normalized = normalizePath(path) |
no test coverage detected