mirror of
https://github.com/upscayl/upscayl.git
synced 2025-01-07 04:01:34 +01:00
9 lines
283 B
TypeScript
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(/\.[^/.]+$/, "");
|
||
|
}
|