Update file language on renaming.
This commit is contained in:
@@ -12,4 +12,10 @@ export const capitalize = (value?: string) => {
|
||||
if (!value) return '';
|
||||
|
||||
return value[0].toLocaleUpperCase() + value.slice(1);
|
||||
}
|
||||
|
||||
export const getFileExtention = (filename?: string): string | undefined => {
|
||||
if (!filename) return
|
||||
const ext = (filename.includes('.') && filename.split('.').pop()) || undefined
|
||||
return ext
|
||||
}
|
||||
Reference in New Issue
Block a user