You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 1.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. atob
  2. ===
  3. | **atob**
  4. | [btoa](https://git.coolaj86.com/coolaj86/btoa.js)
  5. | [unibabel.js](https://git.coolaj86.com/coolaj86/unibabel.js)
  6. | Sponsored by [ppl](https://ppl.family)
  7. Uses `Buffer` to emulate the exact functionality of the browser's atob.
  8. Note: Unicode may be handled incorrectly (like the browser).
  9. It turns base64-encoded <strong>a</strong>scii data back **to** <strong>b</strong>inary.
  10. ```javascript
  11. (function () {
  12. "use strict";
  13. var atob = require('atob');
  14. var b64 = "SGVsbG8sIFdvcmxkIQ==";
  15. var bin = atob(b64);
  16. console.log(bin); // "Hello, World!"
  17. }());
  18. ```
  19. ### Need Unicode and Binary Support in the Browser?
  20. Check out [unibabel.js](https://git.coolaj86.com/coolaj86/unibabel.js)
  21. Changelog
  22. =======
  23. * v2.1.0 address a few issues and PRs, update URLs
  24. * v2.0.0 provide browser version for ios web workers
  25. * v1.2.0 provide (empty) browser version
  26. * v1.1.3 add MIT license
  27. * v1.1.2 node only
  28. LICENSE
  29. =======
  30. Code copyright 2012-2018 AJ ONeal
  31. Dual-licensed MIT and Apache-2.0
  32. Docs copyright 2012-2018 AJ ONeal
  33. Docs released under [Creative Commons](https://git.coolaj86.com/coolaj86/atob.js/blob/master/LICENSE.DOCS).