{"id":28599878,"url":"https://github.com/un-ts/ab64","last_synced_at":"2025-07-17T13:34:41.824Z","repository":{"id":57745587,"uuid":"519400975","full_name":"un-ts/ab64","owner":"un-ts","description":"The smallest and fastest Base64 implementation in JavaScript based on `atob` and `btoa` from browser native or `Buffer` from node","archived":false,"fork":false,"pushed_at":"2025-06-30T07:33:03.000Z","size":895,"stargazers_count":12,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-07T15:35:35.366Z","etag":null,"topics":["base64","base64-decoding","base64-encoding","base64url","js-base64"],"latest_commit_sha":null,"homepage":"https://ab64.js.org","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/un-ts.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,"zenodo":null},"funding":{"github":["JounQin","1stG","rx-ts","un-ts"],"patreon":"1stG","open_collective":"unts","custom":["https://opencollective.com/1stG","https://opencollective.com/rxts","https://afdian.com/a/JounQin"]}},"created_at":"2022-07-30T02:43:27.000Z","updated_at":"2025-06-24T09:52:39.000Z","dependencies_parsed_at":"2023-01-31T21:02:01.104Z","dependency_job_id":"5199b6d3-b856-4462-aff0-8f3147190470","html_url":"https://github.com/un-ts/ab64","commit_stats":{"total_commits":22,"total_committers":3,"mean_commits":7.333333333333333,"dds":0.5,"last_synced_commit":"34ed9ea38b2aba7cb74b28db1457a4e2aafcc036"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":"un-ts/lib-boilerplate","purl":"pkg:github/un-ts/ab64","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/un-ts%2Fab64","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/un-ts%2Fab64/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/un-ts%2Fab64/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/un-ts%2Fab64/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/un-ts","download_url":"https://codeload.github.com/un-ts/ab64/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/un-ts%2Fab64/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265513785,"owners_count":23780150,"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":["base64","base64-decoding","base64-encoding","base64url","js-base64"],"created_at":"2025-06-11T13:38:48.056Z","updated_at":"2025-07-17T13:34:41.819Z","avatar_url":"https://github.com/un-ts.png","language":"TypeScript","funding_links":["https://github.com/sponsors/JounQin","https://github.com/sponsors/1stG","https://github.com/sponsors/rx-ts","https://github.com/sponsors/un-ts","https://patreon.com/1stG","https://opencollective.com/unts","https://opencollective.com/1stG","https://opencollective.com/rxts","https://afdian.com/a/JounQin"],"categories":[],"sub_categories":[],"readme":"# ab64\n\n[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/un-ts/ab64/ci.yml?branch=main)](https://github.com/un-ts/ab64/actions/workflows/ci.yml?query=branch%3Amain)\n[![Codecov](https://img.shields.io/codecov/c/github/un-ts/ab64.svg)](https://codecov.io/gh/un-ts/ab64)\n[![type-coverage](https://img.shields.io/badge/dynamic/json.svg?label=type-coverage\u0026prefix=%E2%89%A5\u0026suffix=%\u0026query=$.typeCoverage.atLeast\u0026uri=https%3A%2F%2Fraw.githubusercontent.com%2Fun-ts%2Fab64%2Fmain%2Fpackage.json)](https://github.com/plantain-00/type-coverage)\n[![CodeRabbit Pull Request Reviews](https://img.shields.io/coderabbit/prs/github/un-ts/ab64)](https://coderabbit.ai)\n[![npm](https://img.shields.io/npm/v/ab64.svg)](https://www.npmjs.com/package/ab64)\n[![GitHub Release](https://img.shields.io/github/release/un-ts/ab64)](https://github.com/un-ts/ab64/releases)\n\n[![Conventional Commits](https://img.shields.io/badge/conventional%20commits-1.0.0-yellow.svg)](https://conventionalcommits.org)\n[![Renovate enabled](https://img.shields.io/badge/renovate-enabled-brightgreen.svg)](https://renovatebot.com)\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n[![Code Style: Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n[![changesets](https://img.shields.io/badge/maintained%20with-changesets-176de3.svg)](https://github.com/changesets/changesets)\n\nThe smallest and fastest Base64 implementation in JavaScript based on `atob` and `btoa` from browser native or `Buffer` from node\n\n## TOC \u003c!-- omit in toc --\u003e\n\n- [Usage](#usage)\n  - [Install](#install)\n  - [API](#api)\n    - [Basic](#basic)\n    - [Polyfill](#polyfill)\n    - [Ponyfill](#ponyfill)\n    - [MiniApp (WeChat)](#miniapp-wechat)\n- [Sponsors and Backers](#sponsors-and-backers)\n  - [Sponsors](#sponsors)\n  - [Backers](#backers)\n- [Changelog](#changelog)\n- [License](#license)\n\n## Usage\n\n### Install\n\n```sh\n# pnpm\npnpm add ab64\n\n# yarn\nyarn add ab64\n\n# npm\nnpm i ab64\n```\n\n### API\n\n#### Basic\n\n```js\nimport { decode, decodeUrl, encode, encodeUrl } from 'ab64'\n\nencode('Hello World!') // SGVsbG8gV29ybGQh\n\nencode('dankogai') // ZGFua29nYWk=\nencodeUrl('dankogai') // ZGFua29nYWk\n\nencode('小飼弾') // 5bCP6aO85by+\nencodeUrl('小飼弾') // 5bCP6aO85by-\n\ndecode('SGVsbG8gV29ybGQh') // Hello World!\n\ndecode('ZGFua29nYWk=') // dankogai\ndecodeUrl('ZGFua29nYWk') // dankogai\n\ndecode('5bCP6aO85by+') // 小飼弾\ndecodeUrl('5bCP6aO85by-') // 小飼弾\n```\n\n#### Polyfill\n\nIf you're running on a non Node environment where `atob` and `btoa` could be unavailable, you may want to include the `polyfill` manually\n\n```js\nimport 'ab64/polyfill'\n\n// same as above then\n```\n\n#### Ponyfill\n\n`atob` and `btoa` are also available exported as `ab64/ponyfill` which does not polyfill by default\n\n```js\nimport { atob, btoa } from 'ab64/ponyfill'\n\n// same as browser native\n```\n\n#### MiniApp (WeChat)\n\nSince mini app (from wechat) does not support global polyfill, so you have to use the separate `mini-app` entry instead which uses the above ponyfill inside\n\n```js\nimport { decode, decodeUrl, encode, encodeUrl } from 'ab64/mini-app'\n```\n\nOr you should add an alias mapping `ab64` to `ab64/mini-app` in your `rollup`/`vite`/`webpack` configuration\n\n## Sponsors and Backers\n\n[![Sponsors](https://raw.githubusercontent.com/1stG/static/master/sponsors.svg)](https://github.com/sponsors/JounQin)\n\n### Sponsors\n\n| 1stG                                                                                                                   | RxTS                                                                                                                   | UnTS                                                                                                                   |\n| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |\n| [![1stG Open Collective sponsors](https://opencollective.com/1stG/organizations.svg)](https://opencollective.com/1stG) | [![RxTS Open Collective sponsors](https://opencollective.com/rxts/organizations.svg)](https://opencollective.com/rxts) | [![UnTS Open Collective sponsors](https://opencollective.com/unts/organizations.svg)](https://opencollective.com/unts) |\n\n### Backers\n\n| 1stG                                                                                                                | RxTS                                                                                                                | UnTS                                                                                                                |\n| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |\n| [![1stG Open Collective backers](https://opencollective.com/1stG/individuals.svg)](https://opencollective.com/1stG) | [![RxTS Open Collective backers](https://opencollective.com/rxts/individuals.svg)](https://opencollective.com/rxts) | [![UnTS Open Collective backers](https://opencollective.com/unts/individuals.svg)](https://opencollective.com/unts) |\n\n## Changelog\n\nDetailed changes for each release are documented in [CHANGELOG.md](./CHANGELOG.md).\n\n## License\n\n[MIT][] © [JounQin][]@[1stG.me][]\n\n[1stg.me]: https://www.1stg.me\n[jounqin]: https://GitHub.com/JounQin\n[mit]: http://opensource.org/licenses/MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fun-ts%2Fab64","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fun-ts%2Fab64","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fun-ts%2Fab64/lists"}