mol_key 0.0.676 → 0.0.677

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
@@ -416,7 +416,7 @@ var $;
416
416
  if ('outerHTML' in val)
417
417
  return val.outerHTML;
418
418
  try {
419
- return JSON.stringify(val, null, '\t');
419
+ return JSON.stringify(val, (k, v) => typeof v === 'bigint' ? String(v) : v, '\t');
420
420
  }
421
421
  catch (error) {
422
422
  console.error(error);
@@ -2063,6 +2063,8 @@ var $;
2063
2063
  return true;
2064
2064
  }
2065
2065
  function compare_buffer(left, right) {
2066
+ if (left instanceof DataView)
2067
+ return compare_buffer(new Uint8Array(left.buffer, left.byteOffset, left.byteLength), new Uint8Array(right.buffer, left.byteOffset, left.byteLength));
2066
2068
  const len = left.byteLength;
2067
2069
  if (len !== right.byteLength)
2068
2070
  return false;
@@ -2206,6 +2208,11 @@ var $;
2206
2208
  $mol_assert_ok($mol_compare_deep(new Uint8Array([0]), new Uint8Array([0])));
2207
2209
  $mol_assert_not($mol_compare_deep(new Uint8Array([0]), new Uint8Array([1])));
2208
2210
  },
2211
+ 'DataView'() {
2212
+ $mol_assert_ok($mol_compare_deep(new DataView(new Uint8Array().buffer), new DataView(new Uint8Array().buffer)));
2213
+ $mol_assert_ok($mol_compare_deep(new DataView(new Uint8Array([0]).buffer), new DataView(new Uint8Array([0]).buffer)));
2214
+ $mol_assert_not($mol_compare_deep(new DataView(new Uint8Array([0]).buffer), new DataView(new Uint8Array([1]).buffer)));
2215
+ },
2209
2216
  'Serializale'() {
2210
2217
  class User {
2211
2218
  name;