base64.js 331 B

123456789
  1. if(typeof btoa === "undefined"){
  2. if(typeof Buffer === "undefined") {
  3. root.Buffer = require("buffer").Buffer
  4. }
  5. root.btoa = function (data) { return Buffer.from(data, "binary").toString("base64"); };
  6. root.atob = function (data) { return Buffer.from(data, "base64").toString("binary"); };
  7. }