{"id":31425046,"url":"https://github.com/es-shims/es-arraybuffer-base64","last_synced_at":"2025-09-30T04:55:09.210Z","repository":{"id":221445838,"uuid":"643083748","full_name":"es-shims/es-arraybuffer-base64","owner":"es-shims","description":"An ES-spec-compliant shim/polyfill/replacement for ArrayBuffer base64 methods that works as far down as ES3","archived":false,"fork":false,"pushed_at":"2025-07-07T22:59:10.000Z","size":234,"stargazers_count":9,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-09-21T20:18:04.876Z","etag":null,"topics":["arraybuffer","base64","ecmascript","javascript"],"latest_commit_sha":null,"homepage":"","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/es-shims.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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,"zenodo":null},"funding":{"github":["ljharb"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":"npm/es5-shim","community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2023-05-20T03:59:34.000Z","updated_at":"2025-08-21T17:09:21.000Z","dependencies_parsed_at":"2025-05-12T18:35:38.962Z","dependency_job_id":null,"html_url":"https://github.com/es-shims/es-arraybuffer-base64","commit_stats":null,"previous_names":["es-shims/es-arraybuffer-base64"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/es-shims/es-arraybuffer-base64","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/es-shims%2Fes-arraybuffer-base64","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/es-shims%2Fes-arraybuffer-base64/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/es-shims%2Fes-arraybuffer-base64/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/es-shims%2Fes-arraybuffer-base64/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/es-shims","download_url":"https://codeload.github.com/es-shims/es-arraybuffer-base64/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/es-shims%2Fes-arraybuffer-base64/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277632370,"owners_count":25850734,"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-09-30T02:00:09.208Z","response_time":75,"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":["arraybuffer","base64","ecmascript","javascript"],"created_at":"2025-09-30T04:55:07.491Z","updated_at":"2025-09-30T04:55:09.208Z","avatar_url":"https://github.com/es-shims.png","language":"JavaScript","funding_links":["https://github.com/sponsors/ljharb","https://tidelift.com/funding/github/npm/es5-shim"],"categories":[],"sub_categories":[],"readme":"# es-arraybuffer-base64 \u003csup\u003e[![Version Badge][npm-version-svg]][package-url]\u003c/sup\u003e\n\n[![github actions][actions-image]][actions-url]\n[![coverage][codecov-image]][codecov-url]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n\n[![npm badge][npm-badge-png]][package-url]\n\nAn ES-spec-compliant shim/polyfill/replacement for ArrayBuffer base64 methods that works as far down as ES3\n\nThis package implements the [es-shim API](https://github.com/es-shims/api) “multi” interface. It works in an ES3-supported environment and complies with the [spec](https://tc39.es/proposal-arraybuffer-base64/).\n\nBecause the `Iterator.prototype` methods depend on a receiver (the `this` value), the main export in each subdirectory takes the string to operate on as the first argument.\n\nThe main export of the package itself is simply an array of the available directory names. It’s sole intended use is for build tooling and testing.\n\nIf `Uint8Array` is not present, the `shim` functions and `auto` entrypoints will be a no-op.\n\n## Supported things\n\n - [`Uint8Array.fromBase64`](https://tc39.es/proposal-arraybuffer-base64/spec/#sec-uint8array.frombase64)\n - [`Uint8Array.fromHex`](https://tc39.es/proposal-arraybuffer-base64/spec/#sec-uint8array.fromhex)\n - [`Uint8Array.prototype.toBase64`](https://tc39.es/proposal-arraybuffer-base64/spec/#sec-uint8array.prototype.tobase64)\n - [`Uint8Array.prototype.toHex`](https://tc39.es/proposal-arraybuffer-base64/spec/#sec-uint8array.prototype.tohex)\n - [`Uint8Array.prototype.setFromBase64`](https://tc39.es/proposal-arraybuffer-base64/spec/#sec-uint8array.prototype.setfrombase64)\n - [`Uint8Array.prototype.setFromHex`](https://tc39.es/proposal-arraybuffer-base64/spec/#sec-uint8array.prototype.setfromhex)\n\n## When you need this package\n\n - When you are using an engine that does not support any of the above methods\n - When using Safari 18.5 or earlier, which fails to throw on odd-length hex strings\n\n## Getting started\n\n```sh\nnpm install --save es-arraybuffer-base64\n```\n\n## Usage/Examples\n\n```js\nconst fromHex = require('es-arraybuffer-base64/Uint8Array.fromHex');\nconst toHex = require('es-arraybuffer-base64/Uint8Array.prototype.toHex');\nconst assert = require('assert');\n\nconst array = new Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100]);\nconst hex = '48656c6c6f20576f726c64';\n\nassert.deepEqual(fromHex(hex), array);\nassert.equal(toHex(array), hex);\n```\n\n```js\nrequire('./auto'); // shim all of the methods\n\nrequire('./Uint8Array.fromHex/auto'); // shim the “fromHex” method\n```\n\n## Tests\nSimply clone the repo, `npm install`, and run `npm test`\n\n[package-url]: https://npmjs.org/package/es-arraybuffer-base64\n[npm-version-svg]: https://versionbadg.es/es-shims/es-arraybuffer-base64.svg\n[deps-svg]: https://david-dm.org/es-shims/es-arraybuffer-base64.svg\n[deps-url]: https://david-dm.org/es-shims/es-arraybuffer-base64\n[dev-deps-svg]: https://david-dm.org/es-shims/es-arraybuffer-base64/dev-status.svg\n[dev-deps-url]: https://david-dm.org/es-shims/es-arraybuffer-base64#info=devDependencies\n[npm-badge-png]: https://nodei.co/npm/es-arraybuffer-base64.png?downloads=true\u0026stars=true\n[license-image]: https://img.shields.io/npm/l/es-arraybuffer-base64.svg\n[license-url]: LICENSE\n[downloads-image]: https://img.shields.io/npm/dm/es-arraybuffer-base64.svg\n[downloads-url]: https://npm-stat.com/charts.html?package=es-arraybuffer-base64\n[codecov-image]: https://codecov.io/gh/es-shims/es-arraybuffer-base64/branch/main/graphs/badge.svg\n[codecov-url]: https://app.codecov.io/gh/es-shims/es-arraybuffer-base64/\n[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/es-arraybuffer-base64\n[actions-url]: https://github.com/es-shims/es-arraybuffer-base64/actions\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fes-shims%2Fes-arraybuffer-base64","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fes-shims%2Fes-arraybuffer-base64","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fes-shims%2Fes-arraybuffer-base64/lists"}