1
0
mirror of https://github.com/upscayl/upscayl.git synced 2024-11-28 01:10:52 +01:00
upscayl/electron/utils/remove-file-extension.ts

11 lines
313 B
TypeScript
Raw Normal View History

import { Dirent } from "fs";
/**
* 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(/\.[^/.]+$/, "");
}