mirror of
https://github.com/upscayl/upscayl.git
synced 2024-12-13 08:11:11 +01:00
11 lines
313 B
TypeScript
11 lines
313 B
TypeScript
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(/\.[^/.]+$/, "");
|
|
}
|