(path: string | undefined)
| 6 | } |
| 7 | |
| 8 | export function getDirectory(path: string | undefined) { |
| 9 | if (!path) return "" |
| 10 | const trimmed = path.replace(/[/\\]+$/, "") |
| 11 | const parts = trimmed.split(/[/\\]/) |
| 12 | return parts.slice(0, parts.length - 1).join("/") + "/" |
| 13 | } |
| 14 | |
| 15 | export function getFileExtension(path: string | undefined) { |
| 16 | if (!path) return "" |
no outgoing calls
no test coverage detected