mol_wire_lib 1.0.807 → 1.0.809

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
@@ -204,7 +204,6 @@ var $;
204
204
  $.$mol_dev_format_element = $mol_dev_format_element;
205
205
  function $mol_dev_format_span(style, ...content) {
206
206
  return $mol_dev_format_element('span', {
207
- 'vertical-align': '8%',
208
207
  ...style,
209
208
  }, ...content);
210
209
  }
@@ -886,6 +885,8 @@ var $;
886
885
  return true;
887
886
  }
888
887
  function compare_buffer(left, right) {
888
+ if (left instanceof DataView)
889
+ return compare_buffer(new Uint8Array(left.buffer, left.byteOffset, left.byteLength), new Uint8Array(right.buffer, left.byteOffset, left.byteLength));
889
890
  const len = left.byteLength;
890
891
  if (len !== right.byteLength)
891
892
  return false;
@@ -1783,7 +1784,7 @@ var $;
1783
1784
  if (super.get(key) === value)
1784
1785
  return this;
1785
1786
  super.set(key, value);
1786
- this.pub.emit();
1787
+ this.pub?.emit();
1787
1788
  return this;
1788
1789
  }
1789
1790
  delete(key) {
package/web.test.js CHANGED
@@ -752,6 +752,11 @@ var $;
752
752
  $mol_assert_ok($mol_compare_deep(new Uint8Array([0]), new Uint8Array([0])));
753
753
  $mol_assert_not($mol_compare_deep(new Uint8Array([0]), new Uint8Array([1])));
754
754
  },
755
+ 'DataView'() {
756
+ $mol_assert_ok($mol_compare_deep(new DataView(new Uint8Array().buffer), new DataView(new Uint8Array().buffer)));
757
+ $mol_assert_ok($mol_compare_deep(new DataView(new Uint8Array([0]).buffer), new DataView(new Uint8Array([0]).buffer)));
758
+ $mol_assert_not($mol_compare_deep(new DataView(new Uint8Array([0]).buffer), new DataView(new Uint8Array([1]).buffer)));
759
+ },
755
760
  'Serializale'() {
756
761
  class User {
757
762
  name;
@@ -862,7 +867,7 @@ var $;
862
867
  if ('outerHTML' in val)
863
868
  return val.outerHTML;
864
869
  try {
865
- return JSON.stringify(val, null, '\t');
870
+ return JSON.stringify(val, (k, v) => typeof v === 'bigint' ? String(v) : v, '\t');
866
871
  }
867
872
  catch (error) {
868
873
  console.error(error);