{"name":"is-tif","version":"1.0.1","description":"Check if a Buffer/Uint8Array is a TIFF image","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-tif.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":["tif","tiff","graphics","image","img","pic","picture","photo","type","detect","check","is","exif","binary","buffer","uint8array"],"devDependencies":{"mocha":"*","read-chunk":"^1.0.0"},"gitHead":"c18555f3ace51f9895f0a9110a029b304a1ebaa6","bugs":{"url":"https://github.com/sindresorhus/is-tif/issues"},"homepage":"https://github.com/sindresorhus/is-tif#readme","_id":"is-tif@1.0.1","_npmVersion":"5.6.0","_nodeVersion":"8.10.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-QmOJLD2f4jjQZSDS2mJ85AornoVjCwrv/aBjm4RWatLF2nSsHxTkuYkHpKKV/BvQVg4U2sASc56G7rXwUIWRTw==","shasum":"a0b887b90518a5ba0c7cd4b0aed2b2294702ed0d","tarball":"http://registry-npm.ywwl.com/is-tif/download/is-tif-1.0.1.tgz","fileCount":4,"unpackedSize":3039,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAJY2N1xzyYe1cKoKiEoLQIyl08cfl1CybXQ57fRzgoDAiAbQYKhqE7EBGmqmNDOs6xC8TaHVNxHI5BSTP7N3cGyiw=="}],"size":1763,"noattachment":false,"key":"/is-tif/-/is-tif-1.0.1.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-tif_1.0.1_1521735770312_0.9888041242384713"},"_hasShrinkwrap":false,"readme":"# is-tif\n\n> Check if a Buffer/Uint8Array is a [TIFF](https://en.wikipedia.org/wiki/TIFF) image\n\n## Install\n\n```\n$ npm install is-tif\n```\n\n## Usage\n\n##### Node.js\n\n```js\nimport {readChunkSync} from 'read-chunk';\nimport isTif from 'is-tif';\n\nconst buffer = readChunkSync('unicorn.tif', {length: 4});\n\nisTif(buffer);\n//=> true\n```\n\n##### Browser\n\n```js\nconst xhr = new XMLHttpRequest();\nxhr.open('GET', 'unicorn.tif');\nxhr.responseType = 'arraybuffer';\n\nxhr.onload = () => {\n\tisTif(new Uint8Array(this.response));\n\t//=> true\n};\n\nxhr.send();\n```\n\n## API\n\n### isTif(buffer)\n\nAccepts a `Buffer` (Node.js) or `Uint8Array`.\n\nIt only needs the first 4 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":1521735770359,"_cnpm_publish_time":1521735770359,"dist-tags":{"latest":"2.0.0"}}