(filePath: string)
| 20 | * @returns True if the file has an image extension, false otherwise. |
| 21 | */ |
| 22 | export function isImageFile(filePath: string): boolean { |
| 23 | const imageExtensions = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp', 'svg']; |
| 24 | const fileExtension = filePath.split('.').pop()?.toLowerCase() || ''; |
| 25 | return imageExtensions.includes(fileExtension); |
| 26 | } |
| 27 | |
| 28 | /** |
| 29 | * Checks if a file is a video file based on its extension. Non-exhaustive list. |
no test coverage detected
searching dependent graphs…