{"name":"utf-8-validate","version":"6.0.4","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=8.11.2","prebuild-linux-musl-x64":"prebuildify-cross --image alpine --napi --strip --target=8.11.2","prebuild-darwin-x64+arm64":"prebuildify --arch x64+arm64 --napi --strip --target=8.11.2","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":"^10.0.1","prebuildify":"^6.0.0","prebuildify-cross":"^5.0.0"},"_id":"utf-8-validate@6.0.4","gitHead":"8d159b34a470e2a2e31e9b4cfbdeb683912e2f69","_nodeVersion":"22.1.0","_npmVersion":"10.7.0","dist":{"integrity":"sha512-xu9GQDeFp+eZ6LnCywXN/zBancWvOpUMzgjLPSjy4BRHSmTelvn2E0DG0o1sTiw5hkCKBHo8rwSKncfRfv2EEQ==","shasum":"1305a1bfd94cecb5a866e6fc74fd07f3ed7292e5","tarball":"http://registry-npm.ywwl.com/utf-8-validate/download/utf-8-validate-6.0.4.tgz","fileCount":15,"unpackedSize":753246,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCaPcUbyk93u1MX3GfYg1Yq3SrDzNHZfRgbXq9W3ntoXgIhAI7tIFRexK0MX6s7A/zfSUsOiQk/MPGjbxo3e8EY9zXg"}],"size":237709,"noattachment":false,"key":"/utf-8-validate/-/utf-8-validate-6.0.4.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_6.0.4_1715358416127_0.7886578690145345"},"_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":1715358416317,"_cnpm_publish_time":1715358416317,"dist-tags":{"latest":"6.1.0","n-api":"4.0.0-napi"}}