mirror of
https://github.com/upscayl/upscayl.git
synced 2024-11-14 10:47:56 +01:00
6 lines
184 B
TypeScript
6 lines
184 B
TypeScript
export default function getFilenameFromPath(path: string) {
|
|
if (!path) return "";
|
|
const separator = path.includes("/") ? "/" : "\\";
|
|
return path.split(separator).slice(-1)[0];
|
|
}
|