{"_id":"is-jxr","_rev":"901214","name":"is-jxr","description":"Check if a Buffer/Uint8Array is a JPEG XR image","dist-tags":{"latest":"2.0.0"},"maintainers":[{"name":"sindresorhus","email":""}],"time":{"modified":"2021-09-18T18:50:55.000Z","created":"2014-04-21T17:42:03.110Z","2.0.0":"2021-09-18T18:46:41.379Z","1.0.1":"2018-03-22T15:53:58.843Z","1.0.0":"2014-08-14T14:38:00.981Z","0.1.1":"2014-04-29T19:12:03.536Z","0.1.0":"2014-04-21T17:42:03.110Z"},"users":{},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-jxr.git"},"versions":{"2.0.0":{"name":"is-jxr","version":"2.0.0","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"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"scripts":{"test":"xo && ava"},"keywords":["jxr","jpeg xr","jpg","jpeg","image","img","pic","picture","photo","type","detect","check","is","exif","binary","buffer","uint8array","cli","bin"],"devDependencies":{"ava":"^3.15.0","read-chunk":"^4.0.2","xo":"^0.44.0"},"gitHead":"c8efc51c35353d69f6935b13de9fc6afec1e06e0","bugs":{"url":"https://github.com/sindresorhus/is-jxr/issues"},"homepage":"https://github.com/sindresorhus/is-jxr#readme","_id":"is-jxr@2.0.0","_nodeVersion":"16.9.1","_npmVersion":"7.20.3","dist":{"shasum":"fc7365186cbb126977469febe1d06a3a377cbb22","size":1698,"noattachment":false,"key":"/is-jxr/-/is-jxr-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-jxr/download/is-jxr-2.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-jxr_2.0.0_1631990801230_0.608836149874237"},"_hasShrinkwrap":false,"publish_time":1631990801379,"_cnpm_publish_time":1631990801379},"1.0.1":{"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","size":1745,"noattachment":false,"key":"/is-jxr/-/is-jxr-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-jxr/download/is-jxr-1.0.1.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-jxr_1.0.1_1521734038785_0.23232258793070448"},"_hasShrinkwrap":false,"publish_time":1521734038843,"_cnpm_publish_time":1521734038843},"1.0.0":{"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":""}],"dist":{"shasum":"d2025b519413d0e65dfc6bb762afeaa3def6382b","size":1073,"noattachment":false,"key":"/is-jxr/-/is-jxr-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-jxr/download/is-jxr-1.0.0.tgz"},"directories":{},"publish_time":1408027080981,"_cnpm_publish_time":1408027080981,"_hasShrinkwrap":false},"0.1.1":{"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","size":1134,"noattachment":false,"key":"/is-jxr/-/is-jxr-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-jxr/download/is-jxr-0.1.1.tgz"},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1398798723536,"_cnpm_publish_time":1398798723536,"_hasShrinkwrap":false},"0.1.0":{"name":"is-jxr","version":"0.1.0","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.0","dist":{"shasum":"ac5db88597518baf5dffc2c29350194798ec55a2","size":1127,"noattachment":false,"key":"/is-jxr/-/is-jxr-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-jxr/download/is-jxr-0.1.0.tgz"},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1398102123110,"_cnpm_publish_time":1398102123110,"_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","_attachments":{},"homepage":"https://github.com/sindresorhus/is-jxr#readme","bugs":{"url":"https://github.com/sindresorhus/is-jxr/issues"},"license":"MIT"}