@saasquatch/squatch-js 2.6.3-2 → 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/CHANGELOG.md +11 -2
- package/coverage/clover.xml +50 -46
- package/coverage/coverage-final.json +1 -1
- package/coverage/lcov.info +72 -66
- package/dist/squatch.esm.js +4 -3
- package/dist/squatch.esm.js.map +1 -1
- package/dist/squatch.js +4 -3
- package/dist/squatch.js.map +1 -1
- package/dist/squatch.min.js +1 -1
- package/dist/utils/cookieUtils.d.ts +1 -0
- package/package.json +3 -3
package/dist/squatch.js
CHANGED
|
@@ -1583,13 +1583,14 @@ 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
1588
|
function b64encode(input) {
|
|
1589
|
-
|
|
1589
|
+
var encodedInput = new TextEncoder().encode(input);
|
|
1590
|
+
var binary = Array.from(encodedInput, byte => String.fromCodePoint(byte)).join("");
|
|
1591
|
+
return btoa(binary).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
|
|
1590
1592
|
} // https://stackoverflow.com/a/11319865
|
|
1591
1593
|
|
|
1592
|
-
|
|
1593
1594
|
function getTopDomain() {
|
|
1594
1595
|
var i,
|
|
1595
1596
|
h,
|