{"name":"is-cwebp-readable","version":"2.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"},"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 --fix --format=codeframe benchmark index.js test.js","test":"node --throw-deprecation --track-heap-objects test.js | tap-spec","coverage":"istanbul cover test.js"},"license":"CC0-1.0","files":["index.js"],"keywords":["buffer","uint8array","type","file","detect","image","jpg","jpeg","png","tif","tiff","webp","cwebp"],"dependencies":{"file-type":"^4.3.0"},"devDependencies":{"@shinnn/eslint-config-node":"^3.0.0","eslint":"^3.19.0","istanbul":"^0.4.5","tap-spec":"^4.1.1","tape":"^4.6.3"},"eslintConfig":{"extends":"@shinnn/node"},"gitHead":"e9a5c8bafbd51a1489c18cccf8ac0a781a267088","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.1","_shasum":"afb93b0c0abd0a25101016ae33aea8aedf926d26","_from":".","_npmVersion":"4.5.0","_nodeVersion":"7.9.0","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"dist":{"shasum":"afb93b0c0abd0a25101016ae33aea8aedf926d26","tarball":"http://registry-npm.ywwl.com/is-cwebp-readable/download/is-cwebp-readable-2.0.1.tgz","integrity":"sha512-VdCK1HN5F9vURT3GTLBViE/o/eRv2Z08q6bARfp8L6aFemIHMHPSYR9jOZpM2MvOSEYDtZWsiNovsqwsTLk5TA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEyXA2DQfLUO70Yd4WcrJKJckKw9XTttrfhgX2vDmPNNAiBUQRNHeZra+MAVX5YeOMezV2CF+Fn0uf9sARPmJXEpEw=="}],"size":1602,"noattachment":false,"key":"/is-cwebp-readable/-/is-cwebp-readable-2.0.1.tgz"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/is-cwebp-readable-2.0.1.tgz_1494230065763_0.5021410286426544"},"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":1494230068324,"_cnpm_publish_time":1494230068324,"dist-tags":{"latest":"3.0.0","next":"3.0.0-1"}}