New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

isignature

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

isignature

File extractor to get real extension of file given by checking through the file's signature

latest
Source
npmnpm
Version
1.0.7
Version published
Maintainers
1
Created
Source

iSignature

File extractor to get real extension of file given by checking through the file's signature

Installation

Using NPM:

npm install isignature

Using Yarn:

yarn add isignature

Usage

const { getSignature } = require("isignature")
const somefile = require("./path/to/somefile.jpg")

const data = getSignature(somefile)
console.log(data)

Response

PropertyDescriptionExample
valueThe exact match extensionjpg
possibilityThe nearest match to your file['jpg', 'jpeg']
matchThe boolean answer if the given file is matchtrue
filehexThe short hex value of your file00 12 34 56 78

References

signature.json

Keywords

file signature

FAQs

Package last updated on 20 Feb 2023

Did you know?

Socket

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