{"id":28493795,"url":"https://github.com/bitcoinjs/uint8array-tools","last_synced_at":"2025-10-04T05:39:28.505Z","repository":{"id":43733125,"uuid":"418066936","full_name":"bitcoinjs/uint8array-tools","owner":"bitcoinjs","description":"A set of tools for Uint8Array to aide in the move from Buffers.","archived":false,"fork":false,"pushed_at":"2024-08-29T14:12:59.000Z","size":92,"stargazers_count":1,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-08T18:20:49.007Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/bitcoinjs.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2021-10-17T08:33:56.000Z","updated_at":"2025-09-01T06:47:07.000Z","dependencies_parsed_at":"2024-06-18T21:11:41.340Z","dependency_job_id":"c079d699-ef1a-4ac6-8f9e-aa180be93ab9","html_url":"https://github.com/bitcoinjs/uint8array-tools","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/bitcoinjs/uint8array-tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitcoinjs%2Fuint8array-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitcoinjs%2Fuint8array-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitcoinjs%2Fuint8array-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitcoinjs%2Fuint8array-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitcoinjs","download_url":"https://codeload.github.com/bitcoinjs/uint8array-tools/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitcoinjs%2Fuint8array-tools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278269168,"owners_count":25959108,"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","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-06-08T09:31:18.204Z","updated_at":"2025-10-04T05:39:28.499Z","avatar_url":"https://github.com/bitcoinjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Uint8Array Tools\n\nThis library is licensed under MIT.\n\n## Usage\n\nNote: `fromHex` and `compare` mimic the `Buffer.from('ff', 'hex')` and\n`buf1.compare(buf2)` API. Their behavior should be the same in the browser\nas well as in Node.\n\n```js\nimport * as uint8arraytools from \"uint8array-tools\";\nuint8arraytools.fromHex(\"ff\");\n// Uint8Array(1) [ 255 ]\nuint8arraytools.toHex(Uint8Array.from([0xff]));\n// 'ff'\nuint8arraytools.compare(Uint8Array.from([0xff]), Uint8Array.from([0x01]));\n// 1\nuint8arraytools.compare(Uint8Array.from([0xff]), Uint8Array.from([0xff]));\n// 0\nuint8arraytools.compare(Uint8Array.from([0x01]), Uint8Array.from([0xff]));\n// -1\nuint8arraytools.fromUtf8(\"tools\");\n// Uint8Array(5) [ 116, 111, 111, 108, 115 ]\nuint8arraytools.toUtf8(Uint8Array.from([116, 111, 111, 108, 115]));\n// tools\nuint8arraytools.concat([Uint8Array.from([1]), Uint8Array.from([2])]);\n// Uint8Array(2) [ 1, 2 ]\nuint8arraytools.fromBase64(\"dG9vbHM=\");\n// Uint8Array(3) [ 182, 138, 37 ]\nuint8arraytools.toBase64(Uint8Array.from([116, 111, 111, 108, 115]));\n// dG9vbHM=\n\nconst uint8array = new Uint8Array(2);\nuint8arraytools.writeUInt16(uint8array, 0, 0xffff - 1, \"LE\");\nuint8array;\n// Uint8Array(2) [ 254, 255 ]\nuint8arraytools.readUInt16(uint8array, 0, \"LE\");\n// 65534\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitcoinjs%2Fuint8array-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitcoinjs%2Fuint8array-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitcoinjs%2Fuint8array-tools/lists"}