(file: File)
| 64 | * Check if a file is a text file |
| 65 | */ |
| 66 | export function isTextFile(file: File): boolean { |
| 67 | const name = file.name.toLowerCase() |
| 68 | return ( |
| 69 | file.type.startsWith("text/") || |
| 70 | file.type === "application/json" || |
| 71 | TEXT_EXTENSIONS.some((ext) => name.endsWith(ext)) |
| 72 | ) |
| 73 | } |
| 74 | |
| 75 | /** |
| 76 | * Extract text content from a text file |
no outgoing calls
no test coverage detected