UNPKG

docxml

Version:

TypeScript (component) library for building and parsing a DOCX file

15 lines (14 loc) 515 B
/** * @file * Guesstimating the MIME type of binary file attachments, mostly images. * * Adapted from code kindly provided by @pbek: * https://github.com/Stuk/jszip/issues/626#issuecomment-639272737 */ import { FileMime } from '../enums.js'; /** * Guess the mime type associated with a byte stream by looking at the first few signature bytes. * * Throws when the mime type is not recognized, or when it is not JPEG/GIF/PNG. */ export declare function getMimeTypeForUint8Array(uint: Uint8Array): FileMime;