{"name":"utf-8-validate","version":"6.0.6","keywords":["utf-8-validate"],"author":{"url":"http://2x.io","name":"Einar Otto Stangvik","email":"einaros@gmail.com"},"license":"MIT","_id":"utf-8-validate@6.0.6","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"}],"homepage":"https://github.com/websockets/utf-8-validate","bugs":{"url":"https://github.com/websockets/utf-8-validate/issues"},"dist":{"shasum":"8a842c9b15af3f6323a3d5ed5eb9e61d208d8c22","tarball":"http://registry-npm.ywwl.com/utf-8-validate/download/utf-8-validate-6.0.6.tgz","fileCount":16,"integrity":"sha512-q3l3P9UtEEiAHcsgsqTgf9PPjctrDWoIXW3NpOHFdRDbLvu4DLIcxHangJ4RLrWkBcKjmcs/6NkerI8T/rE4LA==","signatures":[{"sig":"MEYCIQDGjqjOFfbOQv4biRRVGCutOu80PktdLSik7+o7hZ5w9AIhAMWd/yeuY73HeRpPE0F1FsA/CBOtsIWnZvC9xGbCE5xh","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":692905,"size":237581,"noattachment":false,"key":"/utf-8-validate/-/utf-8-validate-6.0.6.tgz"},"main":"index.js","engines":{"node":">=6.14.2"},"gitHead":"e8f7d2ff185339f9cc6951fad446b211c7152e16","scripts":{"test":"mocha","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"},"_npmUser":{"name":"lpinca","email":"luigipinca@gmail.com"},"repository":{"url":"git+https://github.com/websockets/utf-8-validate.git","type":"git"},"_npmVersion":"11.6.2","description":"Check if a buffer contains valid UTF-8","directories":{},"_nodeVersion":"25.2.1","dependencies":{"node-gyp-build":"^4.3.0"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^11.0.1","node-gyp":"^12.1.0","prebuildify":"^6.0.0","prebuildify-cross":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/utf-8-validate_6.0.6_1766075880696_0.865389171446926","host":"s3://npm-registry-packages-npm-production"},"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 that takes one argument. To maximize\nperformance, the argument is not validated. It is the caller's responsibility to\nensure that it is correct.\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":1766075880865,"_cnpm_publish_time":1766075880865,"dist-tags":{"latest":"6.1.0","n-api":"4.0.0-napi"}}