JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 693693
  • Score
    100M100P100Q197520F
  • License (Apache-2.0 OR WTFPL)

Base64 encoding and decoding

Package Exports

  • Base64
  • Base64/base64.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (Base64) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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.