Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/docxml/src/utilities/mime-types.ts>getMimeTypeForUint8Array

TypeScript (component) library for building and parsing a DOCX file
Go to Latest
function getMimeTypeForUint8Array
import { getMimeTypeForUint8Array } from "https://deno.land/x/docxml@5.13.0/src/utilities/mime-types.ts";

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.

Parameters

uint: Uint8Array