(fileName: string)
| 68 | |
| 69 | /** Heuristic: file is a cover if its extension is a known image format. */ |
| 70 | export function isCoverFileName(fileName: string): boolean { |
| 71 | const dot = fileName.lastIndexOf("."); |
| 72 | if (dot < 0) return false; |
| 73 | const ext = fileName.slice(dot + 1).toLowerCase(); |
| 74 | if (!ext) return false; |
| 75 | return COVER_EXTENSIONS.has(ext); |
| 76 | } |
no test coverage detected