node-ee-mime-magic

0.1.1 • Public • Published

node-ee-mime-magic

In memory mime sniffer without depencies ( using the files magic numbers )

currently supporting the following file types

  • gif
  • jpeg
  • png
  • tiff
  • webp

Usage

var mimeMagic = require( "node-ee-mime-magic" );

mimeMagic( buffer, function( err, mimeType ){
	if ( err || !mimeType ) console.log( "failed to detect mime type :(" );
	else console.log( "mime type:", mimeType.mime, "extension", mimeType.extension );
} );

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.1
    59
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.1
    59
  • 0.1.0
    174

Package Sidebar

Install

npm i node-ee-mime-magic

Weekly Downloads

233

Version

0.1.1

License

none

Last publish

Collaborators

  • ee