{"_id":"is-woff","_rev":"9-663faf68cf53cccb67eed14309be150f","name":"is-woff","time":{"modified":"2022-06-19T02:53:57.420Z","created":"2015-02-04T05:44:51.668Z","1.0.0":"2015-02-04T05:44:51.668Z","1.0.1":"2015-02-04T06:18:26.719Z","1.0.2":"2016-02-29T11:22:20.982Z","1.0.3":"2016-02-29T12:13:01.302Z"},"maintainers":[{"name":"junmer","email":"junmer@foxmail.com"}],"dist-tags":{"latest":"1.0.3"},"description":"Check if a Buffer/Uint8Array is WOFF","readme":"# is-woff [![Build Status](https://travis-ci.org/junmer/is-woff.svg?branch=master)](https://travis-ci.org/junmer/is-woff)\n\n> Check if a Buffer/Uint8Array is a [WOFF](http://www.w3.org/TR/WOFF/#WOFFHeader) \n\n## Install\n\n```sh\n$ npm install --save is-woff\n```\n\n\n## Usage\n\n##### Node.js\n\n```js\nvar readChunk = require('read-chunk'); // npm install read-chunk\nvar isWoff = require('is-woff');\nvar buffer = readChunk.sync('font.woff', 0, 8);\n\nisWoff(buffer);\n//=> true\n```\n\n##### Browser\n\n```js\nvar xhr = new XMLHttpRequest();\nxhr.open('GET', 'font.woff');\nxhr.responseType = 'arraybuffer';\n\nxhr.onload = function () {\n\tisWoff(new Uint8Array(this.response));\n\t//=> true\n};\n\nxhr.send();\n```\n\n\n## API\n\n### isWoff(buffer)\n\nAccepts a Buffer (Node.js) or Uint8Array.\n\nIt only needs the first 8 bytes.\n\n## Test\n\n```sh\n$ npm test\n```\n\n> test file from [Font-Awesome](https://github.com/FortAwesome/Font-Awesome)\n\n## License\n\nMIT © [junmer](https://github.com/junmer/)\n","versions":{"1.0.1":{"name":"is-woff","version":"1.0.1","description":"Check if a Buffer/Uint8Array is WOFF","license":"MIT","repository":{"type":"git","url":"https://github.com/junmer/is-woff"},"author":{"name":"junmer"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"files":["index.js"],"keywords":["font","font-face","sfnt","woff","type","detect","check","is","binary","buffer","uint8array"],"devDependencies":{"mocha":"*","read-chunk":"^1.0.0"},"gitHead":"d515ce7ecc100aca26dfd5a920cd66b73ef91097","bugs":{"url":"https://github.com/junmer/is-woff/issues"},"homepage":"https://github.com/junmer/is-woff","_id":"is-woff@1.0.1","_shasum":"2746585de3129daa9aaa9d539b62660b2f55ec21","_from":".","_npmVersion":"2.0.0-alpha-5","_npmUser":{"name":"junmer","email":"junmer@foxmail.com"},"maintainers":[{"name":"junmer","email":"junmer@foxmail.com"}],"dist":{"shasum":"2746585de3129daa9aaa9d539b62660b2f55ec21","tarball":"https://registry.npmjs.org/is-woff/-/is-woff-1.0.1.tgz","integrity":"sha512-iUZPTNAoMU5gslQ2UvmdLC9HPDKNV4+i1GWyFBpYoKQ0FBn+hiPnkvd3OU5VhXP6hdS7jUyQRd3FgyO/YVcS2g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDerV++z7j4paXSH2IlgtbfCEDEyJxE0Sl1lTgNXy/NMwIgNJmWNgAOhfLV62wkt1mnOq8Iom77e7EkhXhGeiVqSyU="}]}},"1.0.2":{"name":"is-woff","version":"1.0.2","description":"Check if a Buffer/Uint8Array is WOFF","license":"MIT","repository":{"type":"git","url":"git+https://github.com/junmer/is-woff.git"},"author":{"name":"junmer"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha test.js"},"files":["index.js"],"keywords":["font","font-face","sfnt","woff","type","detect","check","is","binary","buffer","uint8array"],"devDependencies":{"mocha":"*","read-chunk":"^1.0.0"},"gitHead":"0ca92b97e50f2b1ef8b80212543efb811963ad55","bugs":{"url":"https://github.com/junmer/is-woff/issues"},"homepage":"https://github.com/junmer/is-woff#readme","_id":"is-woff@1.0.2","_shasum":"4564da27571aaafcd58618c806c02149a33b1dd8","_from":".","_npmVersion":"2.14.7","_nodeVersion":"3.3.1","_npmUser":{"name":"junmer","email":"junmer@foxmail.com"},"dist":{"shasum":"4564da27571aaafcd58618c806c02149a33b1dd8","tarball":"https://registry.npmjs.org/is-woff/-/is-woff-1.0.2.tgz","integrity":"sha512-s+1uJ5M9PyPOru6C7v8PUbNl3R5dDhhmnpCOO9DyOADkfenjOjp0Y5GsVljLfatK4+koOlZQ9Jhee6de9R3cxA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHkJxwH+nhWGV7cKhE8khugSMT7EJH3/gGDUvExLImRyAiEApP9V4hoAdyb89cNcFawORAJGrF4gzCJtHm0JEUTxImg="}]},"maintainers":[{"name":"junmer","email":"junmer@foxmail.com"}],"_npmOperationalInternal":{"host":"packages-5-east.internal.npmjs.com","tmp":"tmp/is-woff-1.0.2.tgz_1456744938110_0.15811088518239558"}},"1.0.3":{"name":"is-woff","version":"1.0.3","description":"Check if a Buffer/Uint8Array is WOFF","license":"MIT","repository":{"type":"git","url":"git+https://github.com/junmer/is-woff.git"},"author":{"name":"junmer"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha test.js"},"files":["index.js"],"keywords":["font","font-face","sfnt","woff","type","detect","check","is","binary","buffer","uint8array"],"devDependencies":{"mocha":"*","read-chunk":"^1.0.0"},"gitHead":"0ca92b97e50f2b1ef8b80212543efb811963ad55","bugs":{"url":"https://github.com/junmer/is-woff/issues"},"homepage":"https://github.com/junmer/is-woff#readme","_id":"is-woff@1.0.3","_shasum":"4951de604a9218f458c2c18c64c835802e02fa6b","_from":".","_npmVersion":"2.14.7","_nodeVersion":"3.3.1","_npmUser":{"name":"junmer","email":"junmer@foxmail.com"},"dist":{"shasum":"4951de604a9218f458c2c18c64c835802e02fa6b","tarball":"https://registry.npmjs.org/is-woff/-/is-woff-1.0.3.tgz","integrity":"sha512-gm8k3MyCWQaum1kE91X8GYPuUIS/SeBleKfi85Oszeqn2pHNSY4TP5AUKFCLTaruX2HzLv9dQmS8+N8vDJtrQA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEmmXvEOwyhw8UT8dLTtF6E8M6M26dkfewsne9UQO3OiAiEAneTQSgNMRWPqvWiQ0DgfMOeJFOlpdT+tNpEODPKON6E="}]},"maintainers":[{"name":"junmer","email":"junmer@foxmail.com"}],"_npmOperationalInternal":{"host":"packages-6-west.internal.npmjs.com","tmp":"tmp/is-woff-1.0.3.tgz_1456747980047_0.3790799034759402"}}},"homepage":"https://github.com/junmer/is-woff#readme","keywords":["font","font-face","sfnt","woff","type","detect","check","is","binary","buffer","uint8array"],"repository":{"type":"git","url":"git+https://github.com/junmer/is-woff.git"},"author":{"name":"junmer"},"bugs":{"url":"https://github.com/junmer/is-woff/issues"},"license":"MIT","readmeFilename":"readme.md"}