{"_id":"utf-8-validate@6.1.0","bugs":{"url":"https://github.com/websockets/utf-8-validate/issues"},"dist":{"shasum":"a541c3041319a07f7f49f14f403acd518c030587","tarball":"http://registry-npm.ywwl.com/utf-8-validate/download/utf-8-validate-6.1.0.tgz","fileCount":17,"integrity":"sha512-+VqK0s7hdUuvL95ExzfqCqvsuA2A+3KzNYibPeeDnGU9L5onk8CY5/H30kCHLpVMzEh6HV9Dv8uw+E+Mz4X/dA==","signatures":[{"sig":"MEYCIQDNdMLOoN1B3pva0RfLPFpJVMXlK0ndROjn9X5ualffPQIhALARnYi+84mB/kITxQSFrvwrqhhUi1VQlvE/rlFH84ta","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDqUU5Pk75zPewB4M03AtDVAOqkcVaNr7A3/sxehVGaWwIhANhoEnwPJNDo7oZm4baIyriXVitAiEgG8ZqzLofA2aVJ"}],"unpackedSize":762233,"size":244869,"noattachment":false,"key":"/utf-8-validate/-/utf-8-validate-6.1.0.tgz"},"main":"index.js","name":"utf-8-validate","author":{"url":"http://2x.io","name":"Einar Otto Stangvik","email":"einaros@gmail.com"},"engines":{"node":">=6.14.2"},"gitHead":"12ffd4344cd7be946fd39e31ce4a20087033ae06","license":"MIT","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"},"version":"6.1.0","_npmUser":{"name":"lpinca","email":"luigipinca@gmail.com"},"homepage":"https://github.com/websockets/utf-8-validate","keywords":["utf-8-validate"],"repository":{"url":"git+https://github.com/websockets/utf-8-validate.git","type":"git"},"_npmVersion":"12.2.2","description":"Check if a buffer contains valid UTF-8","directories":{},"maintainers":[{"name":"lpinca","email":"luigipinca@gmail.com"}],"_nodeVersion":"26.13.0","dependencies":{"node-gyp-build":"^4.3.0"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^11.0.1","node-gyp":"^13.0.1","prebuildify":"^6.0.0","prebuildify-cross":"^5.0.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/utf-8-validate_6.1.0_1795201232445_0.3762366389983992"},"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":1795201232585,"_cnpm_publish_time":1795201232585,"dist-tags":{"latest":"6.1.0","n-api":"4.0.0-napi"}}