* Get the directory of a file path.
(path: string)
| 49 | * Get the directory of a file path. |
| 50 | */ |
| 51 | function dirname(path: string): string { |
| 52 | const lastSlash = path.lastIndexOf('/') |
| 53 | return lastSlash === -1 ? '' : path.substring(0, lastSlash) |
| 54 | } |
| 55 | |
| 56 | /** |
| 57 | * Get file extension priority order based on source file type. |
no outgoing calls
no test coverage detected