mol_regexp 0.0.956 → 0.0.958

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/node.test.js CHANGED
@@ -1310,6 +1310,8 @@ var $;
1310
1310
  return true;
1311
1311
  }
1312
1312
  function compare_buffer(left, right) {
1313
+ if (left instanceof DataView)
1314
+ return compare_buffer(new Uint8Array(left.buffer, left.byteOffset, left.byteLength), new Uint8Array(right.buffer, left.byteOffset, left.byteLength));
1313
1315
  const len = left.byteLength;
1314
1316
  if (len !== right.byteLength)
1315
1317
  return false;
@@ -1453,6 +1455,11 @@ var $;
1453
1455
  $mol_assert_ok($mol_compare_deep(new Uint8Array([0]), new Uint8Array([0])));
1454
1456
  $mol_assert_not($mol_compare_deep(new Uint8Array([0]), new Uint8Array([1])));
1455
1457
  },
1458
+ 'DataView'() {
1459
+ $mol_assert_ok($mol_compare_deep(new DataView(new Uint8Array().buffer), new DataView(new Uint8Array().buffer)));
1460
+ $mol_assert_ok($mol_compare_deep(new DataView(new Uint8Array([0]).buffer), new DataView(new Uint8Array([0]).buffer)));
1461
+ $mol_assert_not($mol_compare_deep(new DataView(new Uint8Array([0]).buffer), new DataView(new Uint8Array([1]).buffer)));
1462
+ },
1456
1463
  'Serializale'() {
1457
1464
  class User {
1458
1465
  name;
@@ -1563,7 +1570,7 @@ var $;
1563
1570
  if ('outerHTML' in val)
1564
1571
  return val.outerHTML;
1565
1572
  try {
1566
- return JSON.stringify(val, null, '\t');
1573
+ return JSON.stringify(val, (k, v) => typeof v === 'bigint' ? String(v) : v, '\t');
1567
1574
  }
1568
1575
  catch (error) {
1569
1576
  console.error(error);