@saasquatch/squatch-js 2.6.2 → 2.6.3-2

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
@@ -1571,10 +1571,18 @@ var deepMerge = (target, source) => {
1571
1571
  [prop]: isDeep(prop) ? deepMerge(target[prop], source[prop]) : source[prop]
1572
1572
  })).reduce((a, b) => _extends({}, a, b), {});
1573
1573
  return _extends({}, target, replaced);
1574
- };
1574
+ }; // inspired by https://github.com/panva/jose/blob/3c4ad55c92bcd9cbc0512438819717d185c41fb2/src/util/decode_jwt.ts#L22
1575
+
1575
1576
 
1576
1577
  function b64decode(input) {
1577
- return atob(input.replace(/_/g, "/").replace(/-/g, "+"));
1578
+ var binary = atob(input.replace(/_/g, "/").replace(/-/g, "+"));
1579
+ var bytes = new Uint8Array(binary.length);
1580
+
1581
+ for (var i = 0; i < binary.length; i++) {
1582
+ bytes[i] = binary.charCodeAt(i);
1583
+ }
1584
+
1585
+ return new TextDecoder("utf8").decode(bytes);
1578
1586
  }
1579
1587
 
1580
1588
  function b64encode(input) {