{"name":"utf-8-validate","version":"5.0.7","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","prebuild-darwin-x64+arm64":"prebuildify --arch x64+arm64 --napi --strip","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":"^9.0.3","node-gyp":"^7.1.2","prebuildify":"^4.0.0","prebuildify-cross":"^4.0.0"},"gitHead":"c3a9e8a6dc9dfd968834a524c76dd9ad43a3bb5c","_id":"utf-8-validate@5.0.7","_nodeVersion":"16.11.1","_npmVersion":"8.0.0","dist":{"integrity":"sha512-vLt1O5Pp+flcArHGIyKEQq883nBt8nN8tVBcoL0qUXj2XT1n7p70yGIq2VK98I5FdZ1YHc0wk/koOnHjnXWk1Q==","shasum":"c15a19a6af1f7ad9ec7ddc425747ca28c3644922","tarball":"http://registry-npm.ywwl.com/utf-8-validate/download/utf-8-validate-5.0.7.tgz","fileCount":11,"unpackedSize":400442,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDQuHmuuYuo4upFcZAMHttHoWNpguWVDK3EYIUfjRstwgIhAKLmhk3vBibYNR1vzycm9CFBlFLwPvMEz/HsIwBKqDJn"}],"size":157350,"noattachment":false,"key":"/utf-8-validate/-/utf-8-validate-5.0.7.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.7_1634144759137_0.6582862304505412"},"_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":1634144759360,"_cnpm_publish_time":1634144759360,"dist-tags":{"latest":"6.1.0","n-api":"4.0.0-napi"}}