{"name":"is-tif","version":"1.0.0","description":"Check if a Buffer/Uint8Array is a TIFF image","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/is-tif"},"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":"512d51da93349b2e0ba44b8409eb6fbadea036b2","bugs":{"url":"https://github.com/sindresorhus/is-tif/issues"},"homepage":"https://github.com/sindresorhus/is-tif","_id":"is-tif@1.0.0","_shasum":"39e82b507d147e8578ccdc5f3bfb708fc14600fe","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"dist":{"shasum":"39e82b507d147e8578ccdc5f3bfb708fc14600fe","tarball":"http://registry-npm.ywwl.com/is-tif/download/is-tif-1.0.0.tgz","integrity":"sha512-sDcA217w11G7gzTtc9w6W99oLk+k8QT6nea5ncxnEJHiPMs6msJyuJU1524OfP5UeK7nTaPjQy/dfV50RQ5XsA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCFngrTdkXrywEOX9344EZqYPcHiTlJ7AfE0ffuTYIQvQIhAJfMbs4kjbngYgZwA+hESoLS9Vj4thA/xEmhI5dms2Pq"}],"size":1097,"noattachment":false,"key":"/is-tif/-/is-tif-1.0.0.tgz"},"directories":{},"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":1408026832040,"_cnpm_publish_time":1408026832040,"dist-tags":{"latest":"2.0.0"}}