Socket
Socket
Sign inDemoInstall

file-signature

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    file-signature

Get file information based on file signature


Version published
Weekly downloads
95
increased by30.14%
Maintainers
1
Install size
17.8 kB
Created
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 for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your 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