is-flac
Check if a Buffer/Uint8Array is a FLAC file.
Install
$ npm install --save is-flac
$ bower install --save is-flac
$ component install hemanth/is-flac
Usage
Node.js
var readChunk = ; // npm install read-chunkvar isFlac = ;var buffer = ; ;//=> true
Browser
var xhr = ;xhr;xhrresponseType = 'arraybuffer'; xhr { ; //=> true}; xhr;
API
isFlac(buffer)
Accepts a Buffer (Node.js) or Uint8Array.
It only needs the first 4 bytes.
License
MIT © Hemanth.HM