Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Clone in Desktop Download ZIP
Polyfill for browsers which don't provide window.btoa and window.atob
CoffeeScript JavaScript Makefile Shell
Branch: master

Merge pull request #20 from skim1420/license_update

Update license to include Apache 2.0
latest commit 69262ec7e1
@davidchambers authored

README.md

Base64.js

≈ 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.

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 by yahiko.

Running the test suite

make setup
make test

* Minified and gzipped. Run make bytes to verify.

Something went wrong with that request. Please try again.