{"_id":"is-tif","_rev":"518141","name":"is-tif","description":"Check if a Buffer/Uint8Array is a TIFF image","dist-tags":{"latest":"2.0.0"},"maintainers":[{"name":"sindresorhus","email":""}],"time":{"modified":"2021-08-09T19:50:46.000Z","created":"2014-04-21T17:34:19.012Z","2.0.0":"2021-08-09T19:50:17.129Z","1.0.1":"2018-03-22T16:22:50.359Z","1.0.0":"2014-08-14T14:33:52.040Z","0.1.1":"2014-04-29T19:14:29.280Z","0.1.0":"2014-04-21T17:34:19.012Z"},"users":{"rocket0191":true},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-tif.git"},"versions":{"2.0.0":{"name":"is-tif","version":"2.0.0","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":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"scripts":{"test":"xo && ava"},"keywords":["tif","tiff","graphics","image","img","pic","picture","photo","type","detect","check","is","exif","binary","buffer","uint8array"],"devDependencies":{"ava":"^3.15.0","read-chunk":"^4.0.0","xo":"^0.44.0"},"gitHead":"c42732994efe35e6185191ba263858c370453b02","bugs":{"url":"https://github.com/sindresorhus/is-tif/issues"},"homepage":"https://github.com/sindresorhus/is-tif#readme","_id":"is-tif@2.0.0","_nodeVersion":"12.22.1","_npmVersion":"7.10.0","dist":{"shasum":"a1c29c6d4926c955d4d4cbd07e7f16b5640271fe","size":1685,"noattachment":false,"key":"/is-tif/-/is-tif-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-tif/download/is-tif-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-tif_2.0.0_1628538616950_0.42572356482056817"},"_hasShrinkwrap":false,"publish_time":1628538617129,"_cnpm_publish_time":1628538617129},"1.0.1":{"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":{"shasum":"a0b887b90518a5ba0c7cd4b0aed2b2294702ed0d","size":1763,"noattachment":false,"key":"/is-tif/-/is-tif-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-tif/download/is-tif-1.0.1.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-tif_1.0.1_1521735770312_0.9888041242384713"},"_hasShrinkwrap":false,"publish_time":1521735770359,"_cnpm_publish_time":1521735770359},"1.0.0":{"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":""}],"dist":{"shasum":"39e82b507d147e8578ccdc5f3bfb708fc14600fe","size":1097,"noattachment":false,"key":"/is-tif/-/is-tif-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-tif/download/is-tif-1.0.0.tgz"},"directories":{},"publish_time":1408026832040,"_cnpm_publish_time":1408026832040,"_hasShrinkwrap":false},"0.1.1":{"name":"is-tif","version":"0.1.1","description":"Check if a Buffer/Uint8Array is a TIFF image","license":"MIT","repository":{"type":"git","url":"git://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","browser":"browserify -s $npm_package_name -o browser.js ."},"files":["index.js"],"keywords":["tif","tiff","graphics","image","img","pic","picture","photo","type","detect","check","is","exif","binary","buffer","uint8array"],"devDependencies":{"browserify":"^3.0.0","mocha":"*","read-chunk":"^0.1.0"},"bugs":{"url":"https://github.com/sindresorhus/is-tif/issues"},"homepage":"https://github.com/sindresorhus/is-tif","_id":"is-tif@0.1.1","dist":{"shasum":"baa5abade91f5710c9ed8bbffae469211ecce6dc","size":1142,"noattachment":false,"key":"/is-tif/-/is-tif-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-tif/download/is-tif-0.1.1.tgz"},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1398798869280,"_cnpm_publish_time":1398798869280,"_hasShrinkwrap":false},"0.1.0":{"name":"is-tif","version":"0.1.0","description":"Check if a Buffer/Uint8Array is a TIFF image","license":"MIT","repository":{"type":"git","url":"git://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","browser":"browserify -s $npm_package_name -o browser.js ."},"files":["index.js"],"keywords":["tif","tiff","graphics","image","img","pic","picture","photo","type","detect","check","is","exif","binary","buffer","uint8array"],"devDependencies":{"browserify":"^3.0.0","mocha":"*","read-chunk":"^0.1.0"},"bugs":{"url":"https://github.com/sindresorhus/is-tif/issues"},"homepage":"https://github.com/sindresorhus/is-tif","_id":"is-tif@0.1.0","dist":{"shasum":"ab08107274a5c820706747194b292d47ec2445e9","size":1138,"noattachment":false,"key":"/is-tif/-/is-tif-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-tif/download/is-tif-0.1.0.tgz"},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1398101659012,"_cnpm_publish_time":1398101659012,"_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","_attachments":{},"homepage":"https://github.com/sindresorhus/is-tif#readme","bugs":{"url":"https://github.com/sindresorhus/is-tif/issues"},"license":"MIT"}