4 lines
No EOL
184 B
TypeScript
4 lines
No EOL
184 B
TypeScript
export function extension(str: String){
|
|
let file = str.split("/").pop();
|
|
return [file.substr(0,file.lastIndexOf(".")),file.substr(file.lastIndexOf("."),file.length).toLowerCase()];
|
|
} |