{"name":"is-jxr","version":"1.0.0","description":"Check if a Buffer/Uint8Array is a JPEG XR image","license":"MIT","repository":{"type":"git","url":"https://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"},"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":{"mocha":"*","read-chunk":"^1.0.0"},"gitHead":"1e62733a89f1ca631138ed463fa0b3916a89564e","bugs":{"url":"https://github.com/sindresorhus/is-jxr/issues"},"homepage":"https://github.com/sindresorhus/is-jxr","_id":"is-jxr@1.0.0","_shasum":"d2025b519413d0e65dfc6bb762afeaa3def6382b","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"dist":{"shasum":"d2025b519413d0e65dfc6bb762afeaa3def6382b","tarball":"http://registry-npm.ywwl.com/is-jxr/download/is-jxr-1.0.0.tgz","integrity":"sha512-Jnebj99lCb8qG4DxmVf6o8DOKDTEvH/yC86ntPjQtkoj44HmNU3sYUPSS5v0jK+UTAoOyMRqRupHRV8i7gMv9A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBY40J+5tXHQfbCWr1Mx76SQT+1ivlGy7PdQGaXlYr0wAiA7/yGlZhoehm2oaJx+dDuDMi8EeNy7ApKZbB/Z7PlVEg=="}],"size":1073,"noattachment":false,"key":"/is-jxr/-/is-jxr-1.0.0.tgz"},"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":1408027080981,"_cnpm_publish_time":1408027080981,"dist-tags":{"latest":"2.0.0"}}