{"name":"is-jxr","version":"1.0.1","description":"Check if a Buffer/Uint8Array is a JPEG XR image","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-jxr.git"},"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":"39aef392186a05116c34e170652fd4f985aa7fb5","bugs":{"url":"https://github.com/sindresorhus/is-jxr/issues"},"homepage":"https://github.com/sindresorhus/is-jxr#readme","_id":"is-jxr@1.0.1","_shasum":"cc3412cfe0cb784590c5cbfced0d13c0347ff029","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"cc3412cfe0cb784590c5cbfced0d13c0347ff029","tarball":"http://registry-npm.ywwl.com/is-jxr/download/is-jxr-1.0.1.tgz","fileCount":4,"unpackedSize":2964,"integrity":"sha512-hYy5jOxaAi+nhQPkqBCrl/0oP7MhmqPmYOHbn3cJ7YQmvib3EN/bMaamCMU8ZgwUR7eUeyAS2DyGbeFRJc9W3g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCbrUVFaOS00kip0EFWD3r93SuC0mvpVXwPsxg/Tq/7lwIgXCPBkbo2YqpjJoNFzQeBqyS2oAJyHFBooEioMEVc/tA="}],"size":1745,"noattachment":false,"key":"/is-jxr/-/is-jxr-1.0.1.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-jxr_1.0.1_1521734038785_0.23232258793070448"},"_hasShrinkwrap":false,"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":1521734038843,"_cnpm_publish_time":1521734038843,"dist-tags":{"latest":"2.0.0"}}