node package manager


Base64 encoding and decoding


≈ 500 byte* polyfill for browsers which don't provide window.btoa and window.atob.

Although the script does no harm in browsers which do provide these functions, a conditional script loader such as yepnope can prevent unnecessary HTTP requests.

  test: window.btoa && window.atob,
  nope: 'base64.js',
  callbackfunction () {
    // `btoa` and `atob` are now safe to use 

Base64.js stems from a gist by yahiko.

make setup
make test

* Minified and gzipped. Run make bytes to verify.