UNPKG

mcard-js

Version:

MCard - Content-addressable storage with cryptographic hashing, handle resolution, and vector search for Node.js and browsers

28 lines 1.14 kB
export declare class ContentTypeInterpreter { private static readonly MIME_TO_EXT; /** * Convenience method to detect MIME type only. * Matches the API expected by MCard/PCard/VCard. */ static detect(content: string | Uint8Array): string; /** * Detect content type and suggest extension. * * @param content Content string or binary buffer * @param fileExtension Optional file extension hint * @returns Object containing detected mimeType and suggested extension */ static detectContentType(content: string | Uint8Array, fileExtension?: string): { mimeType: string; extension: string; }; static getExtension(mimeType: string): string; /** * Check if content should be treated as binary. */ static isBinaryContent(content: string | Uint8Array, mimeType?: string): boolean; static isKnownLongLineExtension(extension?: string): boolean; static isUnstructuredBinary(sample: Uint8Array): boolean; static hasPathologicalLines(sample: Uint8Array, isKnownType: boolean): boolean; } //# sourceMappingURL=ContentTypeInterpreter.d.ts.map