Skip to content

πŸ†™ Upscayl - #1 Free and Open Source AI Image Upscaler for Linux, MacOS and Windows.

283 B
Raw Blame
/**
 * 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(/\.[^/.]+$/, "");
}