Skip to content

irwansyafani/isignature

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Property Description Example
value The exact match extension jpg
possibility The nearest match to your file ['jpg', 'jpeg']
match The boolean answer if the given file is match true
filehex The short hex value of your file 00 12 34 56 78

References

signature.json

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published