is-heic
Check if a Buffer/Uint8Array is a HEIC image (inspired by is-jpg)
Install
$ npm install --save is-heic
Usage
Node.js
var readChunk = ; // npm install read-chunkvar isHeic = ;var buffer = readChunk; ;//=> true
Browser
var xhr = ;xhr;xhrresponseType = 'arraybuffer'; xhr { ; //=> true}; xhr;
API
isHeic(buffer)
Accepts a Buffer (Node.js) or Uint8Array.
It only needs the first 24 bytes.
License
MIT © Oleh Aleinyk