Socket
Socket
Sign inDemoInstall

file-signature

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Protect your apps from supply chain attacks

Install

file-signature

Get file information based on file signature

    1.0.0latest
    GitHub
    npm

Version published
Maintainers
1
Weekly downloads
112
decreased by-15.15%

Weekly downloads

Readme

Source

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: http://en.wikipedia.org/wiki/List_of_file_signatures

Example use:


var fileSignature = require('file-signature');
console.log(fileSignature.identify('path/to/file.jpg'));

// outputs:
// {
//   extension: 'jpg',
//   description: 'A commonly used method of lossy compression for digital photography (image).',
//   mimeType: 'image/jpg'
// }

Keywords

FAQs

Last updated on 11 Sep 2015

Did you know?

Socket installs a GitHub app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc