mol_db 0.0.854 → 0.0.855

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
@@ -1806,6 +1806,8 @@ var $;
1806
1806
  return true;
1807
1807
  }
1808
1808
  function compare_buffer(left, right) {
1809
+ if (left instanceof DataView)
1810
+ return compare_buffer(new Uint8Array(left.buffer, left.byteOffset, left.byteLength), new Uint8Array(right.buffer, left.byteOffset, left.byteLength));
1809
1811
  const len = left.byteLength;
1810
1812
  if (len !== right.byteLength)
1811
1813
  return false;
@@ -1949,6 +1951,11 @@ var $;
1949
1951
  $mol_assert_ok($mol_compare_deep(new Uint8Array([0]), new Uint8Array([0])));
1950
1952
  $mol_assert_not($mol_compare_deep(new Uint8Array([0]), new Uint8Array([1])));
1951
1953
  },
1954
+ 'DataView'() {
1955
+ $mol_assert_ok($mol_compare_deep(new DataView(new Uint8Array().buffer), new DataView(new Uint8Array().buffer)));
1956
+ $mol_assert_ok($mol_compare_deep(new DataView(new Uint8Array([0]).buffer), new DataView(new Uint8Array([0]).buffer)));
1957
+ $mol_assert_not($mol_compare_deep(new DataView(new Uint8Array([0]).buffer), new DataView(new Uint8Array([1]).buffer)));
1958
+ },
1952
1959
  'Serializale'() {
1953
1960
  class User {
1954
1961
  name;
@@ -2059,7 +2066,7 @@ var $;
2059
2066
  if ('outerHTML' in val)
2060
2067
  return val.outerHTML;
2061
2068
  try {
2062
- return JSON.stringify(val, null, '\t');
2069
+ return JSON.stringify(val, (k, v) => typeof v === 'bigint' ? String(v) : v, '\t');
2063
2070
  }
2064
2071
  catch (error) {
2065
2072
  console.error(error);