(filePath: string)
| 32 | * @returns True if the file has a video extension, false otherwise. |
| 33 | */ |
| 34 | export function isVideoFile(filePath: string): boolean { |
| 35 | const videoExtensions = ['mp4', 'webm', 'ogg', 'mov', 'avi', 'wmv', 'mkv', 'm4v']; |
| 36 | const fileExtension = filePath.split('.').pop()?.toLowerCase() || ''; |
| 37 | return videoExtensions.includes(fileExtension); |
| 38 | } |
| 39 | |
| 40 | /** |
| 41 | * Checks if a file is an audio file based on its extension. Non-exhaustive list. |
no test coverage detected
searching dependent graphs…