{"name":"is-jxr","version":"0.1.1","description":"Check if a Buffer/Uint8Array is a JPEG XR image","license":"MIT","repository":{"type":"git","url":"git://github.com/sindresorhus/is-jxr"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha","browser":"browserify -s $npm_package_name -o browser.js ."},"files":["index.js"],"keywords":["jxr","jpeg xr","jpg","jpeg","image","img","pic","picture","photo","type","detect","check","is","exif","binary","buffer","uint8array","cli","bin"],"devDependencies":{"browserify":"^3.0.0","mocha":"*","read-chunk":"^0.1.0"},"bugs":{"url":"https://github.com/sindresorhus/is-jxr/issues"},"homepage":"https://github.com/sindresorhus/is-jxr","_id":"is-jxr@0.1.1","dist":{"shasum":"272fa52049c7c20cd706f08f2000f2c3e1957fea","tarball":"http://registry-npm.ywwl.com/is-jxr/download/is-jxr-0.1.1.tgz","integrity":"sha512-OpkG9Zso6/96xsRJZhE5Nj9/p5rpGwnI5+S5qV8VUUzwbOcEZoja7gl8Vk5XMaIrGYv/g24jhm/fsmbUhV/Rrg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD19UXAWvb6ZUcTyk/HYdkwh9TsRKC3Fk/p11qbf/lbFwIgFRQENlgKsOEdARr+k8JZREZQPzfZe3Z6ecLNxzzDv7A="}],"size":1134,"noattachment":false,"key":"/is-jxr/-/is-jxr-0.1.1.tgz"},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"readme":"# is-jxr\n\n> Check if a Buffer/Uint8Array is a [JPEG XR](https://en.wikipedia.org/wiki/JPEG_XR) image\n\n## Install\n\n```sh\nnpm install is-jxr\n```\n\n## Usage\n\n##### Node.js\n\n```js\nimport {readChunk} from 'read-chunk';\nimport isJxr from 'is-jxr';\n\nconst buffer = await readChunk('unicorn.jxr', {length: 3});\n\nisJxr(buffer);\n//=> true\n```\n\n##### Browser\n\n```js\nconst xhr = new XMLHttpRequest();\nxhr.open('GET', 'unicorn.jxr');\nxhr.responseType = 'arraybuffer';\n\nxhr.onload = () => {\n\tisJxr(new Uint8Array(this.response));\n\t//=> true\n};\n\nxhr.send();\n```\n\n## API\n\n### isJxr(buffer)\n\nAccepts a `Buffer` (Node.js) or `Uint8Array`.\n\nIt only needs the first 3 bytes.\n\n## Related\n\n- [file-type](https://github.com/sindresorhus/file-type) - Detect the file type of a Buffer/Uint8Array\n","publish_time":1398798723536,"_cnpm_publish_time":1398798723536,"dist-tags":{"latest":"2.0.0"}}