{"name":"is-cwebp-readable","version":"3.0.0-1","description":"Check if a Buffer/Uint8Array is available for cwebp image source","repository":{"type":"git","url":"git+https://github.com/shinnn/is-cwebp-readable.git"},"author":{"name":"Shinnosuke Watanabe","url":"https://github.com/shinnn"},"license":"CC0-1.0","scripts":{"bench":"node -p \"require('chalk').yellow('NOTE: Smaller is better.\\n')\" && node benchmark/array-index-of.js && node benchmark/array-includes.js && node benchmark/keys.js && node benchmark/logical-or.js && node benchmark/regexp-test.js && node benchmark/set.js && node -p \"''\"","pretest":"eslint .","test":"nyc node test.js"},"keywords":["buffer","uint8array","type","file","detect","image","jpg","jpeg","png","tif","tiff","webp","cwebp"],"dependencies":{"file-type":"^10.5.0"},"devDependencies":{"@shinnn/eslint-config":"^6.8.1","chalk":"^2.4.1","eslint":"^5.9.0","nyc":"^13.1.0","nyc-config-common":"^1.0.1","tape":"^4.9.1"},"eslintConfig":{"extends":"@shinnn"},"nyc":{"extends":"nyc-config-common"},"readme":"# is-cwebp-readable\n\n[![NPM version](https://img.shields.io/npm/v/is-cwebp-readable.svg)](https://www.npmjs.com/package/is-cwebp-readable)\n[![Build Status](https://travis-ci.org/shinnn/is-cwebp-readable.svg?branch=master)](https://travis-ci.org/shinnn/is-cwebp-readable)\n[![Coverage Status](https://img.shields.io/coveralls/shinnn/is-cwebp-readable.svg)](https://coveralls.io/github/shinnn/is-cwebp-readable)\n\nCheck if a Buffer/Uint8Array is available for [cwebp](https://developers.google.com/speed/webp/docs/cwebp) image source\n\n```javascript\nconst {readFileSync} = require('fs');\nconst isCwebpReadable = require('is-cwebp-readable');\n\nisCwebpReadable(readFileSync('fixture.png')); //=> true\nisCwebpReadable(readFileSync('fixture.bmp')); //=> false\n```\n\n## Installation\n\n[Use npm.](https://docs.npmjs.com/cli/install)\n\n```\nnpm install is-cwebp-readable\n```\n\n## API\n\n```javascript\nconst isCwebpReadable = require('is-cwebp-readable');\n```\n\n### isCwebpReadable(*data*)\n\n*data*: [`Buffer`](https://nodejs.org/api/buffer.html#buffer_class_buffer) or [`Uint8Array`](http://www.ecma-international.org/ecma-262/6.0/#sec-typedarray-objects)  \nReturn: `boolean`\n\nIt returns `true` if the data is [PNG](https://wikipedia.org/wiki/Portable_Network_Graphics), [JPEG](https://wikipedia.org/wiki/JPEG), [TIFF](https://wikipedia.org/wiki/Tagged_Image_File_Format), or [WebP](https://wikipedia.org/wiki/WebP), otherwise `false`.\n\n## License\n\n[Creative Commons Zero v1.0 Universal](https://creativecommons.org/publicdomain/zero/1.0/deed)\n","readmeFilename":"README.md","gitHead":"944ff64dd221bbcb054a370932e99573420c2ce3","bugs":{"url":"https://github.com/shinnn/is-cwebp-readable/issues"},"homepage":"https://github.com/shinnn/is-cwebp-readable#readme","_id":"is-cwebp-readable@3.0.0-1","_npmVersion":"6.5.0","_nodeVersion":"11.4.0","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"dist":{"integrity":"sha512-7/azTv0tj4X8jK4dcy4bgFKvjCWOrE2G7oXMNkEBv5TK2nn4qqnH1YvAx3GvjfDGlAzKdVh31rB/ZCojKaJ4tA==","shasum":"bd468cf87ee9ee098cace9d980fb5693bca7e995","tarball":"http://registry-npm.ywwl.com/is-cwebp-readable/download/is-cwebp-readable-3.0.0-1.tgz","fileCount":3,"unpackedSize":2923,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcF6guCRA9TVsSAnZWagAA4g4P/RKfHHS+6kg4sFU/ilbK\n/7o3G2Q357HTo5TexJua0recCtojLTcdgOR4LWQLnpWEmoRzHNZyNvO0bHv4\nC4yPLIbv+c//GF7sTT3QFQVBPsI1szL2J3wc2Di4vdtYxCKmmzJAvK91ZxbL\nTcgCZgXSU0mjS7+OpyAwedw9fF+KaucJU8Wle5jLjptygNm6AucgKdcgqEH7\nZYtWnfOmVInC5bdHeDFewJem1mA9uTRWiBOybhDR7NrQZOrDkCExlTYsqqug\ngXex33toPYkojoPC0JkeQK3fsKsFcqAddAFFtT936FR6y9dONxjGTlxP2DhI\ns9uWuHULLU62uOj1X4t4Xv6BprpKNSpx+/D+S82kS4zbCo8wUl+EHBE6UKG1\n5D6ufExmaDc+S+4XRnf2J/zz7QzclT6iZYg01UXBTRzNDKT7u8hgtuTkxiF7\nHbsjyjCUwO2yNZ8leXqaZ9OWosgfZIZnxJsnqiG6EhzgTQvqPay0dLB4iYR8\ny8LQcN6spaoLcrUn8mmxO7X8uXXw5XbRrqEbP4b/ZH5rwN+GPxMl8VPcA8mx\noIgF77b9gfFIYCpGoB6YXFOKMTBVfAt4sVA6EXB+RqdbQ7WCQ1yr3znQcl8H\nuPsw52u8lH182FizO/thpaRrMYaD1HgvWyEgb/86vux/ng6PqzLW1x72iH89\nf0NY\r\n=iNi+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDMvC/mwne2YR3EhitEkHSPdXiVmriU4AH6KZ/hRp9XIAiAz9CgFMtN7s0A3gPacUW06JHu4V0qRUJBB21evYKNtRA=="}],"size":1425,"noattachment":false,"key":"/is-cwebp-readable/-/is-cwebp-readable-3.0.0-1.tgz"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-cwebp-readable_3.0.0-1_1545054254231_0.25900542606323484"},"_hasShrinkwrap":false,"publish_time":1545054254345,"_cnpm_publish_time":1545054254345,"dist-tags":{"latest":"3.0.0","next":"3.0.0-1"}}