Sha256: 34ec311144b7590dfab2ada0a4cab559377bfe936394ad9f70b6f39b79d1d0a5
Contents?: true
Size: 810 Bytes
Versions: 66
Compression:
Stored size: 810 Bytes
Contents
# Base64.js ≈ 500 byte* polyfill for browsers which don't provide [`window.btoa`][1] and [`window.atob`][2]. Although the script does no harm in browsers which do provide these functions, a conditional script loader such as [yepnope][3] can prevent unnecessary HTTP requests. ```javascript yepnope({ test: window.btoa && window.atob, nope: 'base64.js', callback: function () { // `btoa` and `atob` are now safe to use } }) ``` Base64.js stems from a [gist][4] by [yahiko][5]. ### Running the test suite make setup make test \* Minified and gzipped. Run `make bytes` to verify. [1]: https://developer.mozilla.org/en/DOM/window.btoa [2]: https://developer.mozilla.org/en/DOM/window.atob [3]: http://yepnopejs.com/ [4]: https://gist.github.com/229984 [5]: https://github.com/yahiko
Version data entries
66 entries across 66 versions & 3 rubygems