mol_dump_lib 0.0.151 → 0.0.153

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/web.mjs CHANGED
@@ -385,7 +385,6 @@ var $;
385
385
  $.$mol_dev_format_element = $mol_dev_format_element;
386
386
  function $mol_dev_format_span(style, ...content) {
387
387
  return $mol_dev_format_element('span', {
388
- 'vertical-align': '8%',
389
388
  ...style,
390
389
  }, ...content);
391
390
  }
@@ -994,6 +993,8 @@ var $;
994
993
  return true;
995
994
  }
996
995
  function compare_buffer(left, right) {
996
+ if (left instanceof DataView)
997
+ return compare_buffer(new Uint8Array(left.buffer, left.byteOffset, left.byteLength), new Uint8Array(right.buffer, left.byteOffset, left.byteLength));
997
998
  const len = left.byteLength;
998
999
  if (len !== right.byteLength)
999
1000
  return false;
@@ -1603,6 +1604,7 @@ var $;
1603
1604
  const getter = (() => value);
1604
1605
  getter['()'] = value;
1605
1606
  getter[Symbol.toStringTag] = value;
1607
+ getter[$mol_dev_format_head] = () => $mol_dev_format_span({}, '()=> ', $mol_dev_format_auto(value));
1606
1608
  return getter;
1607
1609
  }
1608
1610
  $.$mol_const = $mol_const;
package/web.test.js CHANGED
@@ -681,6 +681,11 @@ var $;
681
681
  $mol_assert_ok($mol_compare_deep(new Uint8Array([0]), new Uint8Array([0])));
682
682
  $mol_assert_not($mol_compare_deep(new Uint8Array([0]), new Uint8Array([1])));
683
683
  },
684
+ 'DataView'() {
685
+ $mol_assert_ok($mol_compare_deep(new DataView(new Uint8Array().buffer), new DataView(new Uint8Array().buffer)));
686
+ $mol_assert_ok($mol_compare_deep(new DataView(new Uint8Array([0]).buffer), new DataView(new Uint8Array([0]).buffer)));
687
+ $mol_assert_not($mol_compare_deep(new DataView(new Uint8Array([0]).buffer), new DataView(new Uint8Array([1]).buffer)));
688
+ },
684
689
  'Serializale'() {
685
690
  class User {
686
691
  name;
@@ -791,7 +796,7 @@ var $;
791
796
  if ('outerHTML' in val)
792
797
  return val.outerHTML;
793
798
  try {
794
- return JSON.stringify(val, null, '\t');
799
+ return JSON.stringify(val, (k, v) => typeof v === 'bigint' ? String(v) : v, '\t');
795
800
  }
796
801
  catch (error) {
797
802
  console.error(error);