@saasquatch/squatch-js 2.6.3-2 → 2.6.3-3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/squatch.js CHANGED
@@ -1584,12 +1584,12 @@ function b64decode(input) {
1584
1584
 
1585
1585
  return new TextDecoder("utf8").decode(bytes);
1586
1586
  }
1587
-
1588
1587
  function b64encode(input) {
1589
- return btoa(input).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
1588
+ var encodedInput = new TextEncoder().encode(input.replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_"));
1589
+ var binary = Array.from(encodedInput, byte => String.fromCodePoint(byte)).join("");
1590
+ return btoa(binary);
1590
1591
  } // https://stackoverflow.com/a/11319865
1591
1592
 
1592
-
1593
1593
  function getTopDomain() {
1594
1594
  var i,
1595
1595
  h,