guess-mime

0.0.2 • Public • Published

Guess MIME from Binary String.

A Library to determine mime type from binary string.

import guessMIME from 'guess-mime';
 
const base64 = '...'; // just base64 code of image, without mime segment
const binaryString = window.atob(base64);
const mime = guessMIME(binaryString); // return null if guess failed

Readme

Keywords

none

Package Sidebar

Install

npm i guess-mime

Weekly Downloads

1

Version

0.0.2

License

ISC

Last publish

Collaborators

  • oslh