Eric Foster 35b96bc934 initial commit | 6 gadus atpakaļ | |
---|---|---|
.. | ||
scripts | 6 gadus atpakaļ | |
test | 6 gadus atpakaļ | |
.npmignore | 6 gadus atpakaļ | |
.travis.yml | 6 gadus atpakaļ | |
LICENSE | 6 gadus atpakaļ | |
Makefile | 6 gadus atpakaļ | |
README.md | 6 gadus atpakaļ | |
base64.js | 6 gadus atpakaļ | |
base64.min.js | 6 gadus atpakaļ | |
bower.json | 6 gadus atpakaļ | |
package.json | 6 gadus atpakaļ |
≈ 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.