(files: Map<string, File>)
| 165 | * Check if the dropped files contain image files |
| 166 | */ |
| 167 | export function hasImageFiles(files: Map<string, File>): boolean { |
| 168 | const imageExtensions = ['.jpg', '.jpeg', '.png', '.gif', '.bmp', '.webp', '.tiff', '.tif']; |
| 169 | for (const [, file] of files) { |
| 170 | const name = file.name.toLowerCase(); |
| 171 | if (imageExtensions.some(ext => name.endsWith(ext))) { |
| 172 | return true; |
| 173 | } |
| 174 | } |
| 175 | return false; |
| 176 | } |
| 177 | |
| 178 | function createEmptyGlobalStats(): GlobalStats { |
| 179 | return { |
no outgoing calls
no test coverage detected