1
0
mirror of https://github.com/upscayl/upscayl.git synced 2024-11-24 15:40:21 +01:00
upscayl/electron/utils/remove-file-extension.ts
Nayam Amarshe 6f8df14ed9 Fix #787
2024-04-24 16:04:32 +05:30

9 lines
283 B
TypeScript

/**
* Returns the filename without the extension.
* @param filename The filename to remove the extension from.
* @returns The filename without the extension.
*/
export default function removeFileExtension(filename: string): string {
return filename.replace(/\.[^/.]+$/, "");
}