{"name":"utf-8-validate","version":"5.0.10","description":"Check if a buffer contains valid UTF-8","main":"index.js","engines":{"node":">=6.14.2"},"scripts":{"install":"node-gyp-build","prebuild":"prebuildify --napi --strip --target=14.0.0","prebuild-darwin-x64+arm64":"prebuildify --arch x64+arm64 --napi --strip --target=14.0.0","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.3.0"},"devDependencies":{"mocha":"^10.0.0","node-gyp":"^9.1.0","prebuildify":"^5.0.0"},"gitHead":"f7d38c38022545b1bd12b7b24839927124cde76d","_id":"utf-8-validate@5.0.10","_nodeVersion":"18.11.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==","shasum":"d7d10ea39318171ca982718b6b96a8d2442571a2","tarball":"http://registry-npm.ywwl.com/utf-8-validate/download/utf-8-validate-5.0.10.tgz","fileCount":11,"unpackedSize":402875,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCk1Etvkn9znvQZ9QH16RxJ878DYqeRSNCrfYizQ9yAbwIhAJG4JriA/JhFnfxkhIP0qQHmllm8RDn7Kl/q56jYJEbJ"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjTq/qACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrzmBAAlus7NgLqT5DxSvFyrzpChKXwBpjGi0oCX5sFH8dEXDm5khBG\r\nOpXZm/Suyn9o0cyCU9+NaOt3AluhzcKycL5nLQCnV7pHHAYznIC7hlDagpwq\r\n5p8jJbRvwddQO9UabPtao8th9sVW+iDfNEAFjZqk0yc2eQF/cZHwP+IphX1W\r\n3hloElIfNSffdOcOyJhW2J8QO0IQwNEfAoBpAQ6jtt2xvxTpwm290a9qMREP\r\n5TXVN8NeI0dNfA4oBe6m4U439hrYPBN+D4Jz4UAIitHEE2DgnlFvIHBxIRe4\r\nFI686oV3uk4bIVj9HJcBqFJGrrnwhiM4oBPI5NX5ROtEfQreAbFCbaUa6G+y\r\nIcNHQ22Van6oVyT0DIJIg6Mjw0CJQT488IGCg5oCTnhp79b7HF/TNSzxVCCY\r\nLI7rj5ZGBKZUr5IkRopHXaCDGD8VIemjbe9lFrRXenZ3QGs1ANmbOUStPcyC\r\npxVglrkzsl2xnPZPfxWK5UwzBhFq38yC74NOQKAnEmugfRhYc2LmOcX9804G\r\n5xKvackpiLujHHDAhJ59HHnCykdt1m4uilHgj1p9jEoKGchlEVJuAPoMdDmo\r\nWO9KWz0tx/4+qfGmQSBxEuU8YgH6vJajgz0jgXeNN8S83wn8TXnoJU38mtir\r\nhk5AdqdnkTfptRN4OG1HU/V4xknV8ymlJNg=\r\n=V35M\r\n-----END PGP SIGNATURE-----\r\n","size":159051,"noattachment":false,"key":"/utf-8-validate/-/utf-8-validate-5.0.10.tgz"},"_npmUser":{"name":"lpinca","email":"luigipinca@gmail.com"},"directories":{},"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"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/utf-8-validate_5.0.10_1666101226223_0.7363293758305502"},"_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":1666101226390,"_cnpm_publish_time":1666101226390,"dist-tags":{"latest":"6.1.0","n-api":"4.0.0-napi"}}