{"name":"utf-8-validate","version":"5.0.3","description":"Check if a buffer contains valid UTF-8","main":"index.js","scripts":{"install":"node-gyp-build","prebuild":"prebuildify --napi","test":"mocha"},"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":{"node-gyp-build":"^4.2.0"},"devDependencies":{"mocha":"^8.0.1","prebuildify":"^4.0.0"},"gitHead":"de8c3eb15ca904fe38e6d0cb0cefcec84c3640fd","_id":"utf-8-validate@5.0.3","_nodeVersion":"15.0.1","_npmVersion":"7.0.3","dist":{"integrity":"sha512-jtJM6fpGv8C1SoH4PtG22pGto6x+Y8uPprW0tw3//gGFhDDTiuksgradgFN6yRayDP4SyZZa6ZMGHLIa17+M8A==","shasum":"3b64e418ad2ff829809025fdfef595eab2f03a27","tarball":"http://registry-npm.ywwl.com/utf-8-validate/download/utf-8-validate-5.0.3.tgz","fileCount":11,"unpackedSize":921513,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfnXc3CRA9TVsSAnZWagAAQaYP/AntVWD37GgeHOq16usF\ndTubgwLNkS7LtLasSr9wNNDjDtXz1gVgg60qaKa0/P9bNmOEAkNpnT6mYlhO\nY6/ALcyiURHqr4hyIkwzumW/iIKD28Kq2I+CHXXQZLAvImB2ohU//XYU3lBe\nbslCL9KVroxvX0jX6NpgXsRpWJ+T5PiSiHSwUVOK91zMIUGxLheK3XHGYdtL\npGuIFZa4wPRBdC9IqGAe1sQyIhYpSINFBI5cvlm3TXqCTokofuE/8hxZ3lWx\nBzrLlaOnDb2MfxuaEcIMaoIb8ghp/WJu0eh1CtR8mzYIbHROnV5xfTMMoQiX\nJagwl8nEoZBr4xRqav9mT8aXXQEpnZMiPL1DVws+TOw4xwBEvMIfDfZWTKnO\nFvpkmUoWdj1EufD+/THBU+HPdEONA+qBi3MIRz+urnsAtYOR2qHRN1dMP+AC\nZUqjrxlpDsmv7RDiKawBr0824KHrRw/muRv0WnbFI340SN068hy4sT6lv2f2\nP70lAGiDj9UBV35CmD/NS5WIJenlWCwVvTiPEV3e9Y3BljDfbWYV7EUqpxh+\nVHIr+LaRb9tkB9tJbo+ilJqOEeiBuku5pa8+l5HaWPGDqMBucHyAp/7q0TZC\nFe+UeZBik0c36oUSXV5OpVE2gzApxUT7vPaLfbnsWAmvoox35QIKtSAw7xrl\nQ/tg\r\n=myC5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDNat/aJb5etPcSgZRWimTnM70JrkimsAVk1by6/vpd9gIhAInHQhRllT3EGUmjFfkoBtkQ74JpsX/V5OnBqftYudYk"}],"size":308909,"noattachment":false,"key":"/utf-8-validate/-/utf-8-validate-5.0.3.tgz"},"maintainers":[{"name":"einaros","email":"einaros@gmail.com"},{"name":"v1","email":"npm@3rd-Eden.com"},{"name":"lpinca","email":"luigipinca@gmail.com"},{"name":"3rdeden","email":"npmjs@3rd-Eden.com"}],"_npmUser":{"name":"lpinca","email":"luigipinca@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/utf-8-validate_5.0.3_1604155191469_0.3156553142769416"},"_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":1604155191679,"_cnpm_publish_time":1604155191679,"dist-tags":{"latest":"6.1.0","n-api":"4.0.0-napi"}}