cleaner prune function

This commit is contained in:
waveringana 2022-12-11 06:20:48 +00:00
parent 135c772723
commit 0a0d9b9802
4 changed files with 40 additions and 34 deletions

View file

@ -7,7 +7,7 @@ declare global {
}
}
export function extension(str: String){
export function extension(str: string){
let file = str.split("/").pop();
return [file.substr(0,file.lastIndexOf(".")),file.substr(file.lastIndexOf("."),file.length).toLowerCase()];
}