|
|
il y a 8 ans | |
|---|---|---|
| .. | ||
| scripts | il y a 8 ans | |
| test | il y a 8 ans | |
| .npmignore | il y a 8 ans | |
| .travis.yml | il y a 8 ans | |
| LICENSE | il y a 8 ans | |
| Makefile | il y a 8 ans | |
| README.md | il y a 8 ans | |
| base64.js | il y a 8 ans | |
| base64.min.js | il y a 8 ans | |
| bower.json | il y a 8 ans | |
| package.json | il y a 8 ans | |
≈ 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.