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