isignature

1.0.7 • Public • Published

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

/isignature/

    Package Sidebar

    Install

    npm i isignature

    Weekly Downloads

    3

    Version

    1.0.7

    License

    ISC

    Unpacked Size

    83.7 kB

    Total Files

    4

    Last publish

    Collaborators

    • irwansyafani