(basename: string)
| 91 | } |
| 92 | |
| 93 | export function getFileExtensionFromBasename(basename: string) { |
| 94 | const parts = basename.split("."); |
| 95 | if (parts.length < 2) { |
| 96 | return ""; |
| 97 | } |
| 98 | return (parts.slice(-1)[0] ?? "").toLowerCase(); |
| 99 | } |
| 100 | |
| 101 | /* |
| 102 | Returns the file extension of a URI |
no outgoing calls
no test coverage detected