Skip to content

Function: isTextLikeMimeType()

Makaio Framework


Makaio Framework / ai-adapters-core / isTextLikeMimeType

isTextLikeMimeType(mimeType): boolean

Defined in: ../../../adapters/core/src/utils/normalizeMimeType.ts:26

Check if a MIME type represents text content that can be sent as a document.

Covers text/* and common text-based application/* subtypes (JSON, XML, SQL, GraphQL, JavaScript, TypeScript, YAML, TOML).

string | null | undefined

MIME type string (parameters are allowed, e.g., “text/plain; charset=utf-8”)

boolean

True if the content is text-based.