MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / isTextMime

Function isTextMime

src/utils/binaryExtensions.js:371–377  ·  view source on GitHub ↗
(mime)

Source from the content-addressed store, hash-verified

369}
370
371function isTextMime(mime) {
372 const normalized = normalizeMime(mime);
373 if (!normalized) return false;
374 if (textMimeTypes.has(normalized)) return true;
375
376 return normalized.startsWith("text/");
377}
378
379function normalizeMime(mime) {
380 if (!mime || typeof mime !== "string") return "";

Callers 2

isBinaryFileFunction · 0.85
isBinaryMimeFunction · 0.85

Calls 1

normalizeMimeFunction · 0.85

Tested by

no test coverage detected