npm:
In Browser
node.js
var Base64 = Base64;
es6+
;
npm
$ npm install --save js-base64
SYNOPSIS
Base64; // ZGFua29nYWk=
Base64; // 5bCP6aO85by+
Base64; // 5bCP6aO85by-
Base64; // dankogai
Base64; // 小飼弾
// note .decodeURI() is unnecessary since it accepts both flavors
Base64; // 小飼弾
String Extension for ES5
if Base64extendString
// you have to explicitly extend String.prototype
Base64;
// once extended, you can do the following
'dankogai'; // ZGFua29nYWk=
'小飼弾'; // 5bCP6aO85by+
'小飼弾'; // 5bCP6aO85by-
'小飼弾';