mol_tree2 1.0.506 → 1.0.508
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 +8 -1
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.test.js +8 -1
- package/web.test.js.map +1 -1
package/package.json
CHANGED
package/web.test.js
CHANGED
|
@@ -771,6 +771,8 @@ var $;
|
|
|
771
771
|
return true;
|
|
772
772
|
}
|
|
773
773
|
function compare_buffer(left, right) {
|
|
774
|
+
if (left instanceof DataView)
|
|
775
|
+
return compare_buffer(new Uint8Array(left.buffer, left.byteOffset, left.byteLength), new Uint8Array(right.buffer, left.byteOffset, left.byteLength));
|
|
774
776
|
const len = left.byteLength;
|
|
775
777
|
if (len !== right.byteLength)
|
|
776
778
|
return false;
|
|
@@ -914,6 +916,11 @@ var $;
|
|
|
914
916
|
$mol_assert_ok($mol_compare_deep(new Uint8Array([0]), new Uint8Array([0])));
|
|
915
917
|
$mol_assert_not($mol_compare_deep(new Uint8Array([0]), new Uint8Array([1])));
|
|
916
918
|
},
|
|
919
|
+
'DataView'() {
|
|
920
|
+
$mol_assert_ok($mol_compare_deep(new DataView(new Uint8Array().buffer), new DataView(new Uint8Array().buffer)));
|
|
921
|
+
$mol_assert_ok($mol_compare_deep(new DataView(new Uint8Array([0]).buffer), new DataView(new Uint8Array([0]).buffer)));
|
|
922
|
+
$mol_assert_not($mol_compare_deep(new DataView(new Uint8Array([0]).buffer), new DataView(new Uint8Array([1]).buffer)));
|
|
923
|
+
},
|
|
917
924
|
'Serializale'() {
|
|
918
925
|
class User {
|
|
919
926
|
name;
|
|
@@ -1024,7 +1031,7 @@ var $;
|
|
|
1024
1031
|
if ('outerHTML' in val)
|
|
1025
1032
|
return val.outerHTML;
|
|
1026
1033
|
try {
|
|
1027
|
-
return JSON.stringify(val,
|
|
1034
|
+
return JSON.stringify(val, (k, v) => typeof v === 'bigint' ? String(v) : v, '\t');
|
|
1028
1035
|
}
|
|
1029
1036
|
catch (error) {
|
|
1030
1037
|
console.error(error);
|