node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »


file-signature Build Status

Get file information based on file signature. This utility is used to get file information based on the file signature. It does so by looking at "magic numbers" common formats contain.

Data for this script was generated from:

Example use:

var fileSignature = require('file-signature');
// outputs: 
// { 
//   extension: 'jpg', 
//   description: 'A commonly used method of lossy compression for digital photography (image).', 
//   mimeType: 'image/jpg' 
// }