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