{"id":18376774,"url":"https://github.com/hcodes/isutf8","last_synced_at":"2025-04-16T06:14:49.870Z","repository":{"id":23179553,"uuid":"26535654","full_name":"hcodes/isutf8","owner":"hcodes","description":"Quick check if a Node.js Buffer or Uint8Array is UTF-8","archived":false,"fork":false,"pushed_at":"2024-09-24T04:21:33.000Z","size":1140,"stargazers_count":21,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T05:08:13.995Z","etag":null,"topics":["buffer","javascript","nodejs","uint8array","utf-8"],"latest_commit_sha":null,"homepage":"https://www.npmjs.org/package/isutf8","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hcodes.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-11-12T12:49:22.000Z","updated_at":"2024-09-14T22:11:18.000Z","dependencies_parsed_at":"2024-06-18T15:25:34.374Z","dependency_job_id":"746f5d9e-d688-47c9-93c7-c61ac890017c","html_url":"https://github.com/hcodes/isutf8","commit_stats":{"total_commits":85,"total_committers":4,"mean_commits":21.25,"dds":0.5882352941176471,"last_synced_commit":"0badf5e95cf1c409386725cd0f50efea8facd5ae"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hcodes%2Fisutf8","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hcodes%2Fisutf8/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hcodes%2Fisutf8/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hcodes%2Fisutf8/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hcodes","download_url":"https://codeload.github.com/hcodes/isutf8/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249207218,"owners_count":21230028,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["buffer","javascript","nodejs","uint8array","utf-8"],"created_at":"2024-11-06T00:24:43.148Z","updated_at":"2025-04-16T06:14:49.838Z","avatar_url":"https://github.com/hcodes.png","language":"TypeScript","readme":"[![NPM Version](https://img.shields.io/npm/v/isutf8.svg?style=flat)](https://www.npmjs.org/package/isutf8)\n[![NPM Downloads](https://img.shields.io/npm/dm/isutf8.svg?style=flat)](https://www.npmjs.org/package/isutf8)\n[![Bundlephobia](https://badgen.net/bundlephobia/minzip/isutf8)](https://bundlephobia.com/result?p=isutf8)\n[![install size](https://packagephobia.com/badge?p=isutf8)](https://packagephobia.com/result?p=isutf8)\n\nisutf8\n======\n\nQuick check if a Node.js Buffer or Uint8Array is valid UTF-8.\n\n## Advantages\n- Ultra-small package size\n- No dependencies\n- No pre-compilation\n\n## Install\n`npm install isutf8`\n\n## Usage\n\n### CommonJS\n```js\nconst isUtf8 = require('isutf8');\n\nconst buf = Buffer.from([0xd0, 0x90]);\nconsole.log(isUtf8(buf)); // =\u003e boolean\n\n// or \n\nconst arr = new Uint8Array([0xd0, 0x90]);\nconsole.log(isUtf8(arr)); // =\u003e boolean\n\n```\n\n### ES Modules or TypeScript\n```js\nimport isUtf8 from 'isutf8';\n\nconst buf = Buffer.from([0xd0, 0x90]);\nconsole.log(isUtf8(buf)); // =\u003e boolean\n\n// or \n\nconst arr = new Uint8Array([0xd0, 0x90]);\nconsole.log(isUtf8(arr)); // =\u003e boolean\n```\n\n## License\n[MIT License](./LICENSE)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhcodes%2Fisutf8","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhcodes%2Fisutf8","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhcodes%2Fisutf8/lists"}