Check if a Buffer/Uint8Array is a WOFF
Install
$ npm install --save is-woff
Usage
Node.js
var readChunk = ; // npm install read-chunkvar isWoff = ;var buffer = readChunk; ;//=> true
Browser
var xhr = ;xhr;xhrresponseType = 'arraybuffer'; xhr { ; //=> true}; xhr;
API
isWoff(buffer)
Accepts a Buffer (Node.js) or Uint8Array.
It only needs the first 8 bytes.
Test
$ npm test
test file from Font-Awesome
License
MIT © junmer