@lowentry/utils 1.6.1 → 1.6.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.
Files changed (2) hide show
  1. package/LeUtils.js +4 -4
  2. package/package.json +1 -1
package/LeUtils.js CHANGED
@@ -821,8 +821,8 @@ export const LeUtils = {
821
821
  compareTimestampStrings:
822
822
  (a, b) =>
823
823
  {
824
- a = LeUtils.base64ToHex(STRING(a));
825
- b = LeUtils.base64ToHex(STRING(b));
824
+ a = LeUtils.base64ToHex(STRING(a).replaceAll('-', '+').replaceAll('_', '/'));
825
+ b = LeUtils.base64ToHex(STRING(b).replaceAll('-', '+').replaceAll('_', '/'));
826
826
  return LeUtils.compare(a, b);
827
827
  },
828
828
 
@@ -1577,7 +1577,7 @@ export const LeUtils = {
1577
1577
  const bytes = new Uint8Array(nowBytes.length + uuid.length);
1578
1578
  bytes.set(nowBytes, 0);
1579
1579
  bytes.set(uuid, nowBytes.length);
1580
- uuid = LeUtils.bytesToBase64(bytes).replace(/=/g, '').replace(/\+/g, '-').replace(/\//g, '_');
1580
+ uuid = LeUtils.bytesToBase64(bytes).replaceAll('=', '').replaceAll('+', '-').replaceAll('/', '_');
1581
1581
 
1582
1582
  return {
1583
1583
  time:now,
@@ -1653,7 +1653,7 @@ export const LeUtils = {
1653
1653
  now = Math.round(now);
1654
1654
  const nowBytes = numberToBytes(now);
1655
1655
 
1656
- return LeUtils.bytesToBase64(nowBytes).replace(/=/g, '').replace(/\+/g, '-').replace(/\//g, '_');
1656
+ return LeUtils.bytesToBase64(nowBytes).replaceAll('=', '').replaceAll('+', '-').replaceAll('/', '_');
1657
1657
  };
1658
1658
  })(),
1659
1659
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowentry/utils",
3
- "version": "1.6.1",
3
+ "version": "1.6.2",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Provides utilities for general JavaScript development.",