code: function atob(base64) {
          if (/(=[^=]+|={3,})$/.test(base64)) throw new Error("String contains an invalid character");
          base64 = base64.replace(/=/g, "");
          var n = base64.length & 3;
          if (n === 1) throw new Error("String contains an invalid character");
          for (var i = 0, j = 0, len = base64.length / 4, bin = []; i < len; ++i) {
              var a = tableStr.indexOf(base64[j++] || "A"),
                  b = tableStr.indexOf(base64[j++] || "A");
              var c = tableStr.indexOf(base64[j++] || "A"),
                  d = tableStr.indexOf(base64[j++] || "A");
              if ((a | b | c | d) < 0) throw new Error("String contains an invalid character");
              bin[bin.length] = ((a << 2) | (b >> 4)) & 255;
              bin[bin.length] = ((b << 4) | (c >> 2)) & 255;
              bin[bin.length] = ((c << 6) | d) & 255;
          }
          return String.fromCharCode.apply(null, bin).substr(0, bin.length + n - 4);
      }
docs: atob
  @private