{"id":28766170,"url":"https://github.com/amorgaut/w3c-windowbase64","last_synced_at":"2026-01-30T09:19:55.452Z","repository":{"id":8652049,"uuid":"10304024","full_name":"AMorgaut/w3c-windowbase64","owner":"AMorgaut","description":"WindowBase64 Interface Implementation from the HTML Base64 utility methods (HTML5 section 6.2)","archived":false,"fork":false,"pushed_at":"2024-04-07T17:12:43.000Z","size":12,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-08T20:27:10.931Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AMorgaut.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-05-26T21:46:44.000Z","updated_at":"2024-04-08T20:27:10.932Z","dependencies_parsed_at":"2022-07-08T00:40:32.785Z","dependency_job_id":null,"html_url":"https://github.com/AMorgaut/w3c-windowbase64","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AMorgaut/w3c-windowbase64","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AMorgaut%2Fw3c-windowbase64","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AMorgaut%2Fw3c-windowbase64/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AMorgaut%2Fw3c-windowbase64/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AMorgaut%2Fw3c-windowbase64/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AMorgaut","download_url":"https://codeload.github.com/AMorgaut/w3c-windowbase64/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AMorgaut%2Fw3c-windowbase64/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260351217,"owners_count":22995919,"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":[],"created_at":"2025-06-17T11:41:30.274Z","updated_at":"2026-01-30T09:19:55.447Z","avatar_url":"https://github.com/AMorgaut.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# W3C WindowBase64\r\n\r\nProvides the **WindowBase64** interface defined in the \"**Base64 utility methods**\" (**HTML5 section 6.2**)\r\n\r\nThe **atob()** and **btoa()** methods allow authors to transform content to and from the base64 encoding.\r\n\r\nIn these APIs, for mnemonic purposes, the \"b\" can be considered to stand for \"binary\", and the \"a\" for \"ASCII\". In practice, though, **for primarily historical reasons, both the input and output of these functions are Unicode strings.**\r\n\r\n## Requirements\r\n\r\nThis polyfill will provide HTML5 compliant base64 interface to JavaScript platforms supporting the **Buffer API**.\r\n\r\nIt is currently supported by **node.js** and **Wakanda**.\r\n\r\nLet me know if you are aware of other compatible platforms\r\n\r\n\r\n## How to use\r\n\r\nYou might use it directly from the module itself or apply it to any other object\r\n\r\nex:\r\n```javascript\r\n// Implements the WindowBase64 interface on the global object\r\nrequire('w3c-windowbase64').WindowBase64.apply(this);\r\n```\r\nand then use it from whatever objects you want including the global object\r\n\r\n```javascript\r\nvar base64Str = btoa('string to encode');\r\n```\r\n\r\nor use the methods directly from the module\r\n\r\n```javascript\r\nvar base64Str = require('w3c-windowbase64').btoa('string to encode');\r\n```\r\n\r\n\r\n## Reference\r\nhttp://www.w3.org/TR/html5/webappapis.html#atob\r\n\r\n\r\n## License (MIT License) \r\n\r\nCopyright (c) 2013 Alexandre Morgaut\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy\r\nof this software and associated documentation files (the \"Software\"), to deal\r\nin the Software without restriction, including without limitation the rights\r\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\ncopies of the Software, and to permit persons to whom the Software is\r\nfurnished to do so, subject to the following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be included in\r\nall copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\nTHE SOFTWARE.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famorgaut%2Fw3c-windowbase64","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famorgaut%2Fw3c-windowbase64","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famorgaut%2Fw3c-windowbase64/lists"}