isignature
v1.0.7
Published
File extractor to get real extension of file given by checking through the file's signature
Downloads
23
Maintainers
Readme
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
|