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/node.mjs CHANGED
@@ -400,7 +400,6 @@ var $;
400
400
  $.$mol_dev_format_element = $mol_dev_format_element;
401
401
  function $mol_dev_format_span(style, ...content) {
402
402
  return $mol_dev_format_element('span', {
403
- 'vertical-align': '8%',
404
403
  ...style,
405
404
  }, ...content);
406
405
  }
@@ -1003,6 +1002,8 @@ var $;
1003
1002
  return true;
1004
1003
  }
1005
1004
  function compare_buffer(left, right) {
1005
+ if (left instanceof DataView)
1006
+ return compare_buffer(new Uint8Array(left.buffer, left.byteOffset, left.byteLength), new Uint8Array(right.buffer, left.byteOffset, left.byteLength));
1006
1007
  const len = left.byteLength;
1007
1008
  if (len !== right.byteLength)
1008
1009
  return false;
@@ -2170,6 +2171,7 @@ var $;
2170
2171
  const getter = (() => value);
2171
2172
  getter['()'] = value;
2172
2173
  getter[Symbol.toStringTag] = value;
2174
+ getter[$mol_dev_format_head] = () => $mol_dev_format_span({}, '()=> ', $mol_dev_format_auto(value));
2173
2175
  return getter;
2174
2176
  }
2175
2177
  $.$mol_const = $mol_const;
package/node.test.js CHANGED
@@ -392,7 +392,6 @@ var $;
392
392
  $.$mol_dev_format_element = $mol_dev_format_element;
393
393
  function $mol_dev_format_span(style, ...content) {
394
394
  return $mol_dev_format_element('span', {
395
- 'vertical-align': '8%',
396
395
  ...style,
397
396
  }, ...content);
398
397
  }
@@ -995,6 +994,8 @@ var $;
995
994
  return true;
996
995
  }
997
996
  function compare_buffer(left, right) {
997
+ if (left instanceof DataView)
998
+ return compare_buffer(new Uint8Array(left.buffer, left.byteOffset, left.byteLength), new Uint8Array(right.buffer, left.byteOffset, left.byteLength));
998
999
  const len = left.byteLength;
999
1000
  if (len !== right.byteLength)
1000
1001
  return false;
@@ -2162,6 +2163,7 @@ var $;
2162
2163
  const getter = (() => value);
2163
2164
  getter['()'] = value;
2164
2165
  getter[Symbol.toStringTag] = value;
2166
+ getter[$mol_dev_format_head] = () => $mol_dev_format_span({}, '()=> ', $mol_dev_format_auto(value));
2165
2167
  return getter;
2166
2168
  }
2167
2169
  $.$mol_const = $mol_const;
@@ -7496,6 +7498,11 @@ var $;
7496
7498
  $mol_assert_ok($mol_compare_deep(new Uint8Array([0]), new Uint8Array([0])));
7497
7499
  $mol_assert_not($mol_compare_deep(new Uint8Array([0]), new Uint8Array([1])));
7498
7500
  },
7501
+ 'DataView'() {
7502
+ $mol_assert_ok($mol_compare_deep(new DataView(new Uint8Array().buffer), new DataView(new Uint8Array().buffer)));
7503
+ $mol_assert_ok($mol_compare_deep(new DataView(new Uint8Array([0]).buffer), new DataView(new Uint8Array([0]).buffer)));
7504
+ $mol_assert_not($mol_compare_deep(new DataView(new Uint8Array([0]).buffer), new DataView(new Uint8Array([1]).buffer)));
7505
+ },
7499
7506
  'Serializale'() {
7500
7507
  class User {
7501
7508
  name;
@@ -7606,7 +7613,7 @@ var $;
7606
7613
  if ('outerHTML' in val)
7607
7614
  return val.outerHTML;
7608
7615
  try {
7609
- return JSON.stringify(val, null, '\t');
7616
+ return JSON.stringify(val, (k, v) => typeof v === 'bigint' ? String(v) : v, '\t');
7610
7617
  }
7611
7618
  catch (error) {
7612
7619
  console.error(error);