@saasquatch/squatch-js 2.6.3-3 → 2.6.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
@@ -1583,11 +1583,12 @@ function b64decode(input) {
1583
1583
  }
1584
1584
 
1585
1585
  return new TextDecoder("utf8").decode(bytes);
1586
- }
1586
+ } // Suggestion from https://developer.mozilla.org/en-US/docs/Glossary/Base64#the_unicode_problem
1587
+
1587
1588
  function b64encode(input) {
1588
- var encodedInput = new TextEncoder().encode(input.replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_"));
1589
+ var encodedInput = new TextEncoder().encode(input);
1589
1590
  var binary = Array.from(encodedInput, byte => String.fromCodePoint(byte)).join("");
1590
- return btoa(binary);
1591
+ return btoa(binary).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
1591
1592
  } // https://stackoverflow.com/a/11319865
1592
1593
 
1593
1594
  function getTopDomain() {