Eric Foster 35b96bc934 initial commit | vor 6 Jahren | |
---|---|---|
.. | ||
scripts | vor 6 Jahren | |
test | vor 6 Jahren | |
.npmignore | vor 6 Jahren | |
.travis.yml | vor 6 Jahren | |
LICENSE | vor 6 Jahren | |
Makefile | vor 6 Jahren | |
README.md | vor 6 Jahren | |
base64.js | vor 6 Jahren | |
base64.min.js | vor 6 Jahren | |
bower.json | vor 6 Jahren | |
package.json | vor 6 Jahren |
≈ 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.
make setup
make test
* Minified and gzipped. Run make bytes
to verify.