{"id":21126947,"url":"https://github.com/kevlened/b64u-lite","last_synced_at":"2025-07-08T23:32:42.561Z","repository":{"id":48035560,"uuid":"116532785","full_name":"kevlened/b64u-lite","owner":"kevlened","description":":anchor: isomorphic base64url library in 531 bytes","archived":false,"fork":false,"pushed_at":"2023-01-04T10:37:46.000Z","size":124,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-07T19:23:33.061Z","etag":null,"topics":["base64url","isomorphic","javascript","small"],"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/kevlened.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}},"created_at":"2018-01-07T03:01:28.000Z","updated_at":"2020-09-04T11:28:20.000Z","dependencies_parsed_at":"2023-02-02T09:02:11.010Z","dependency_job_id":null,"html_url":"https://github.com/kevlened/b64u-lite","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevlened%2Fb64u-lite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevlened%2Fb64u-lite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevlened%2Fb64u-lite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevlened%2Fb64u-lite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kevlened","download_url":"https://codeload.github.com/kevlened/b64u-lite/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225470803,"owners_count":17479368,"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":["base64url","isomorphic","javascript","small"],"created_at":"2024-11-20T04:46:04.260Z","updated_at":"2024-11-20T04:46:05.714Z","avatar_url":"https://github.com/kevlened.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# b64u-lite [![NPM](https://img.shields.io/npm/v/b64u-lite.svg)](https://npmjs.com/package/b64u-lite) [![Build](https://travis-ci.org/kevlened/b64u-lite.svg?branch=master)](https://travis-ci.org/kevlened/b64u-lite) [![bundlephobia](https://img.shields.io/bundlephobia/minzip/b64u-lite.svg)](https://bundlephobia.com/result?p=b64u-lite)\n\nNode, browser, and React Native base64url library\n\n## Usage\n\n```javascript\nconst b64u = require('b64u-lite');\n\nb64u.toBase64Url('hi there? 你好');\n// aGkgdGhlcmU_IOS9oOWlvQ\n\n// add padding\nb64u.toBase64Url('hi there? 你好', true);\n// aGkgdGhlcmU_IOS9oOWlvQ==\n\n// convert a buffer to b64u\nb64u.toBase64Url(new Uint8Array([228, 189, 160, 229, 165, 189]).buffer);\n// 5L2g5aW9\n\n// convert b64u to a buffer\nb64u.toBuffer('5L2g5aW9');\n// new Uint8Array([228, 189, 160, 229, 165, 189]).buffer\n\n// works with or without padding\nb64u.fromBase64Url('aGkgdGhlcmU_IOS9oOWlvQ==');\nb64u.fromBase64Url('aGkgdGhlcmU_IOS9oOWlvQ');\n// hi there? 你好\n\n// equivalent to btoa\nb64u.fromBinaryString('hi there? ');\n// aGkgdGhlcmU_IA\n\n// with padding\nb64u.fromBinaryString('hi there? ', true);\n// aGkgdGhlcmU_IA==\n\n// equivalent to atob\nb64u.toBinaryString('aGkgdGhlcmU=');\n// hi there?\n```\n\n## Can it be smaller?\n\nIf you use ES6 imports with a bundler that supports tree-shaking, yes!\n\n```javascript\nimport { toBase64Url } from 'b64u-lite'\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevlened%2Fb64u-lite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkevlened%2Fb64u-lite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevlened%2Fb64u-lite/lists"}