Compile ts files.

This commit is contained in:
muzam1l
2023-01-11 19:52:45 +05:30
parent e75443c8e2
commit 653e28583d
5 changed files with 224 additions and 105 deletions

View File

@@ -19,3 +19,9 @@ export const getFileExtention = (filename?: string): string | undefined => {
const ext = (filename.includes('.') && filename.split('.').pop()) || undefined
return ext
}
export const getFileNamePart = (filename?: string): string | undefined => {
if (!filename) return
const name = (filename.includes('.') && filename.split('.').slice(0, -1).join(".")) || filename
return name
}