Refactor common functions

This commit is contained in:
2024-10-01 22:32:40 +02:00
parent e7fbdd9a8d
commit 61051ebdce
6 changed files with 79 additions and 145 deletions

View File

@@ -0,0 +1,4 @@
export const isImageFile = (filePath) => {
const imageExtensions = ['.jpg', '.jpeg', '.png', '.gif', '.webp', '.svg'];
return imageExtensions.some((ext) => filePath.toLowerCase().endsWith(ext));
};