{"name":"is-cwebp-readable","version":"1.0.0","description":"Check if a Buffer/Uint8Array is available for cwebp image source","repository":{"type":"git","url":"https://github.com/shinnn/is-cwebp-readable"},"author":{"name":"Shinnosuke Watanabe","url":"https://github.com/shinnn"},"scripts":{"pretest":"jscs *.js && eslint *.js","test":"node test.js | tap-spec","coverage":"istanbul cover test.js","coveralls":"${npm_package_scripts_coverage} && istanbul-coveralls"},"licenses":[{"type":"MIT","url":"https://github.com/shinnn/is-cwebp-readable/blob/master/LICENSE"}],"files":["index.js"],"keywords":["buffer","uint8array","type","file","detect","image","jpg","jpeg","png","tif","tiff","webp","cwebp"],"dependencies":{"is-jpg":"^1.0.0","is-png":"^1.0.0","is-tif":"^1.0.0","is-webp":"^1.0.0"},"devDependencies":{"eslint":"^0.13.0","istanbul":"^0.3.5","istanbul-coveralls":"^1.0.1","jscs":"^1.10.0","tap-spec":"^2.2.0","tape":"^3.4.0"},"jscsConfig":{"preset":"google","maximumLineLength":98,"requireBlocksOnNewline":true,"validateLineBreaks":"LF"},"gitHead":"4937858a5a1508cf23c916965958bc61c00bfd59","bugs":{"url":"https://github.com/shinnn/is-cwebp-readable/issues"},"homepage":"https://github.com/shinnn/is-cwebp-readable","_id":"is-cwebp-readable@1.0.0","_shasum":"f44218b65ea59ae3131f063bc3dfe6ac8486bbad","_from":".","_npmVersion":"2.3.0","_nodeVersion":"1.0.1","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"dist":{"shasum":"f44218b65ea59ae3131f063bc3dfe6ac8486bbad","tarball":"http://registry-npm.ywwl.com/is-cwebp-readable/download/is-cwebp-readable-1.0.0.tgz","integrity":"sha512-qP+ODOa6t4j3tniLq5jwhOJgazOW/n8hwlEqqdRbjn1xGj/rSzbkQtv4x7XnF/udhBbLVL+8pHLxkMnKioNUZg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDP9jjm/tSDRyHwUtt21E51TO+w5M9hRA8Qr2FDwQ5f1QIhAMoPJAowBYcfbCrgY+Wajb0yVN8seOtkExdu/GATmKtS"}],"size":2206,"noattachment":false,"key":"/is-cwebp-readable/-/is-cwebp-readable-1.0.0.tgz"},"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":1422382191970,"_cnpm_publish_time":1422382191970,"dist-tags":{"latest":"3.0.0","next":"3.0.0-1"}}