MCPcopy Create free account
hub / github.com/ResearAI/AutoFigure / isTextFile

Function isTextFile

frontend/lib/pdf-utils.ts:66–73  ·  view source on GitHub ↗
(file: File)

Source from the content-addressed store, hash-verified

64 * Check if a file is a text file
65 */
66export 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

Callers 5

isValidFileTypeFunction · 0.90
validateFilesFunction · 0.90
FilePreviewListFunction · 0.90
handleFileChangeFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected