1.0.3 • Published 1 year ago
file-isignature v1.0.3
iSignature
File extractor to get real extension of file given by checking through the file's signature
Installation
Using NPM:
npm install isignatureUsing Yarn:
yarn add isignatureUsage
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 |