In memory mime sniffer without depencies
JavaScript
Switch branches/tags
Nothing to show
Latest commit eed0926 May 31, 2014 @eventEmitter version bump
Permalink
Failed to load latest commit information.
lib added tiff, webp May 31, 2014
.gitignore Initial commit Dec 31, 2012
README.md added tiff, webp May 31, 2014
index.js added tiff, webp May 31, 2014
package.json version bump May 31, 2014

README.md

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 );
} );