{"name":"utf-8-validate","version":"4.0.1","description":"Check if a buffer contains valid UTF-8","main":"index.js","scripts":{"install":"prebuild-install || node-gyp rebuild","coverage":"istanbul cover _mocha --report html","test":"mocha && prebuild-ci"},"repository":{"type":"git","url":"git+https://github.com/websockets/utf-8-validate.git"},"keywords":["utf-8-validate"],"author":{"name":"Einar Otto Stangvik","email":"einaros@gmail.com","url":"http://2x.io"},"license":"MIT","bugs":{"url":"https://github.com/websockets/utf-8-validate/issues"},"homepage":"https://github.com/websockets/utf-8-validate","dependencies":{"bindings":"~1.3.0","nan":"~2.10.0","prebuild-install":"~2.5.0"},"devDependencies":{"istanbul":"~0.4.5","mocha":"~5.0.0","prebuild":"~7.4.0","prebuild-ci":"~2.2.0"},"gitHead":"e7e007c32f50698a2c5594c7a415744c259ad2b9","_id":"utf-8-validate@4.0.1","_npmVersion":"5.6.0","_nodeVersion":"9.11.1","_npmUser":{"name":"lpinca","email":"luigipinca@gmail.com"},"dist":{"integrity":"sha512-d+PRK1C8xTqJn+TVdMX2UQ2aY2Q8jtC8wp6eLIsdV5qbx5N7igR6kZg4uLWvwJINJSx2ahF2/OjVpTdC4QpZdw==","shasum":"ec12589a42bbf0d77709baf5c082c610bd5b5fa6","tarball":"http://registry-npm.ywwl.com/utf-8-validate/download/utf-8-validate-4.0.1.tgz","fileCount":7,"unpackedSize":7433,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBDqqMe778nH64h1vXTm3fo1skl49vmM7RWNXAgqaGYMAiEAkaq9/w4y1sRawWqhVzAGKnbkdDrkoP4+kaOPkORYTR0="}],"size":3114,"noattachment":false,"key":"/utf-8-validate/-/utf-8-validate-4.0.1.tgz"},"maintainers":[{"email":"npm@3rd-Eden.com","name":"3rdeden"},{"email":"einaros@gmail.com","name":"einaros"},{"email":"luigipinca@gmail.com","name":"lpinca"},{"email":"npm@3rd-Eden.com","name":"v1"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/utf-8-validate_4.0.1_1523016439084_0.13210260330351553"},"_hasShrinkwrap":false,"readme":"# utf-8-validate\n\n[![Version npm](https://img.shields.io/npm/v/utf-8-validate.svg?logo=npm)](https://www.npmjs.com/package/utf-8-validate)\n[![Linux/macOS/Windows Build](https://img.shields.io/github/actions/workflow/status/websockets/utf-8-validate/ci.yml?branch=master&label=build&logo=github)](https://github.com/websockets/utf-8-validate/actions?query=workflow%3ACI+branch%3Amaster)\n\nCheck if a buffer contains valid UTF-8 encoded text.\n\n## Installation\n\n```\nnpm install utf-8-validate --save-optional\n```\n\nThe `--save-optional` flag tells npm to save the package in your package.json\nunder the\n[`optionalDependencies`](https://docs.npmjs.com/files/package.json#optionaldependencies)\nkey.\n\n## API\n\nThe module exports a single function which takes one argument.\n\n### `isValidUTF8(buffer)`\n\nChecks whether a buffer contains valid UTF-8.\n\n#### Arguments\n\n- `buffer` - The buffer to check.\n\n#### Return value\n\n`true` if the buffer contains only correct UTF-8, else `false`.\n\n#### Example\n\n```js\n'use strict';\n\nconst isValidUTF8 = require('utf-8-validate');\n\nconst buf = Buffer.from([0xf0, 0x90, 0x80, 0x80]);\n\nconsole.log(isValidUTF8(buf));\n// => true\n```\n\n## License\n\n[MIT](LICENSE)\n","publish_time":1523016439180,"_cnpm_publish_time":1523016439180,"dist-tags":{"latest":"6.1.0","n-api":"4.0.0-napi"}}