(contentType: string)
| 54 | const PARSEABLE_EXTENSIONS = new Set(['pdf', 'docx', 'doc', 'xlsx', 'xls', 'pptx', 'ppt']) |
| 55 | |
| 56 | function isReadableType(contentType: string): boolean { |
| 57 | return TEXT_TYPES.has(contentType) || contentType.startsWith('text/') |
| 58 | } |
| 59 | |
| 60 | function getExtension(filename: string): string { |
| 61 | const dot = filename.lastIndexOf('.') |