{"id":15290805,"url":"https://github.com/mys1024/base64-esm","last_synced_at":"2026-05-06T05:32:33.332Z","repository":{"id":58162435,"uuid":"526516638","full_name":"mys1024/base64-esm","owner":"mys1024","description":"A Base64 library written in ESM.","archived":false,"fork":false,"pushed_at":"2023-03-10T15:33:06.000Z","size":116,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-19T23:54:15.984Z","etag":null,"topics":["base64","javascript-library","npm-package"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/base64-esm","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/mys1024.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":"2022-08-19T08:03:58.000Z","updated_at":"2022-08-29T20:13:52.000Z","dependencies_parsed_at":"2024-12-01T16:46:55.754Z","dependency_job_id":"ceda64d5-78ef-4ee6-adea-343b6e34d700","html_url":"https://github.com/mys1024/base64-esm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mys1024%2Fbase64-esm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mys1024%2Fbase64-esm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mys1024%2Fbase64-esm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mys1024%2Fbase64-esm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mys1024","download_url":"https://codeload.github.com/mys1024/base64-esm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245232914,"owners_count":20581703,"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","javascript-library","npm-package"],"created_at":"2024-09-30T16:09:34.846Z","updated_at":"2026-05-06T05:32:28.291Z","avatar_url":"https://github.com/mys1024.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# base64-esm\n\nA Base64 library written in ESM.\n\n## Usage\n\n### Base64\n\n```typescript\nimport { base64Encode, base64Decode, base64DecodeToStr } from 'base64-esm'\n\n// encode\nbase64Encode(new Uint8Array([80, 171, 243, 128])) // UKvzgA==\nbase64Encode('Hello, world!') // SGVsbG8sIHdvcmxkIQ==\n\n// decode\nbase64Decode('UKvzgA==') // Uint8Array(4) [80, 171, 243, 128]\nbase64DecodeToStr('SGVsbG8sIHdvcmxkIQ==') // Hello, world!\n```\n\n### Base64Url\n\n```typescript\nimport { base64urlEncode, base64urlDecode, base64urlDecodeToStr } from 'base64-esm'\n\n// encode\nbase64urlEncode(new Uint8Array([80, 171, 243, 128])) // UKvzgA\nbase64urlEncode('你好，🌏！这是一个处理 Base64 的 ESM 库。') // 5L2g5aW977yM8J-Mj--8gei_meaYr-S4gOS4quWkhOeQhiBCYXNlNjQg55qEIEVTTSDlupPjgII\n\n// decode\nbase64urlDecode('UKvzgA') // Uint8Array(4) [80, 171, 243, 128]\nbase64urlDecodeToStr('5L2g5aW977yM8J-Mj--8gei_meaYr-S4gOS4quWkhOeQhiBCYXNlNjQg55qEIEVTTSDlupPjgII') // 你好，🌏！这是一个处理 Base64 的 ESM 库。\n```\n\n## References\n\n- Base64: [RFC 4648: Base 64 Encoding](https://datatracker.ietf.org/doc/html/rfc4648#section-4)\n\n- Base64Url: [RFC 4648: Base 64 Encoding with URL and Filename Safe Alphabet](https://datatracker.ietf.org/doc/html/rfc4648#section-5)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmys1024%2Fbase64-esm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmys1024%2Fbase64-esm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmys1024%2Fbase64-esm/lists"}