{"name":"is-cwebp-readable","version":"2.0.0","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"},"scripts":{"bench":"_matcha benchmark/runner.js","pretest":"eslint --fix --format=codeframe index.js benchmark test.js","test":"node --throw-deprecation --track-heap-objects test.js | tap-spec","coverage":"istanbul cover test.js"},"license":"Unlicense","files":["index.js"],"keywords":["buffer","uint8array","type","file","detect","image","jpg","jpeg","png","tif","tiff","webp","cwebp"],"dependencies":{"file-type":"^4.2.0"},"devDependencies":{"@shinnn/eslint-config-node":"^3.0.0","eslint":"^3.19.0","istanbul":"^0.4.5","matcha":"^0.7.0","tap-spec":"^4.1.1","tape":"^4.6.3"},"eslintConfig":{"extends":"@shinnn/node"},"gitHead":"7c4efa206b9089ed73fe749636c133cb44902b68","bugs":{"url":"https://github.com/shinnn/is-cwebp-readable/issues"},"homepage":"https://github.com/shinnn/is-cwebp-readable#readme","_id":"is-cwebp-readable@2.0.0","_shasum":"ea34a35313fafeb0dd21ee5f5cd0832e197b9325","_from":".","_npmVersion":"4.5.0","_nodeVersion":"7.9.0","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"dist":{"shasum":"ea34a35313fafeb0dd21ee5f5cd0832e197b9325","tarball":"http://registry-npm.ywwl.com/is-cwebp-readable/download/is-cwebp-readable-2.0.0.tgz","integrity":"sha512-tSwgXEfKEwLIImA+LP5XdSQNXPLUVp+XXqhQfyiWVZMODD1/jr657whm0TldnnctOHAOHQkEvgex1I/oej8KAw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFDh9SuILPxc10T5wctcfnky95coEbHBDLu3Qo2KZBRqAiEA/ff3tqWm3QjNjZOoaizf9mRTJREpg87UCeaYfeIrzco="}],"size":2193,"noattachment":false,"key":"/is-cwebp-readable/-/is-cwebp-readable-2.0.0.tgz"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/is-cwebp-readable-2.0.0.tgz_1493710937807_0.7938763783313334"},"directories":{},"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.com/shinnn/is-cwebp-readable.svg?branch=master)](https://travis-ci.com/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](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/about-npm/).\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`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)  \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[ISC License](./LICENSE) © 2018 Shinnosuke Watanabe\n","publish_time":1493710938040,"_cnpm_publish_time":1493710938040,"dist-tags":{"latest":"3.0.0","next":"3.0.0-1"}}