Eric Foster 35b96bc934 initial commit vor 6 Jahren
..
scripts initial commit vor 6 Jahren
test initial commit vor 6 Jahren
.npmignore initial commit vor 6 Jahren
.travis.yml initial commit vor 6 Jahren
LICENSE initial commit vor 6 Jahren
Makefile initial commit vor 6 Jahren
README.md initial commit vor 6 Jahren
base64.js initial commit vor 6 Jahren
base64.min.js initial commit vor 6 Jahren
bower.json initial commit vor 6 Jahren
package.json initial commit vor 6 Jahren

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.