mol_text_distance 0.0.596 → 0.0.597
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/node.test.js
CHANGED
|
@@ -1062,6 +1062,8 @@ var $;
|
|
|
1062
1062
|
return true;
|
|
1063
1063
|
}
|
|
1064
1064
|
function compare_buffer(left, right) {
|
|
1065
|
+
if (left instanceof DataView)
|
|
1066
|
+
return compare_buffer(new Uint8Array(left.buffer, left.byteOffset, left.byteLength), new Uint8Array(right.buffer, left.byteOffset, left.byteLength));
|
|
1065
1067
|
const len = left.byteLength;
|
|
1066
1068
|
if (len !== right.byteLength)
|
|
1067
1069
|
return false;
|
|
@@ -1205,6 +1207,11 @@ var $;
|
|
|
1205
1207
|
$mol_assert_ok($mol_compare_deep(new Uint8Array([0]), new Uint8Array([0])));
|
|
1206
1208
|
$mol_assert_not($mol_compare_deep(new Uint8Array([0]), new Uint8Array([1])));
|
|
1207
1209
|
},
|
|
1210
|
+
'DataView'() {
|
|
1211
|
+
$mol_assert_ok($mol_compare_deep(new DataView(new Uint8Array().buffer), new DataView(new Uint8Array().buffer)));
|
|
1212
|
+
$mol_assert_ok($mol_compare_deep(new DataView(new Uint8Array([0]).buffer), new DataView(new Uint8Array([0]).buffer)));
|
|
1213
|
+
$mol_assert_not($mol_compare_deep(new DataView(new Uint8Array([0]).buffer), new DataView(new Uint8Array([1]).buffer)));
|
|
1214
|
+
},
|
|
1208
1215
|
'Serializale'() {
|
|
1209
1216
|
class User {
|
|
1210
1217
|
name;
|
|
@@ -1315,7 +1322,7 @@ var $;
|
|
|
1315
1322
|
if ('outerHTML' in val)
|
|
1316
1323
|
return val.outerHTML;
|
|
1317
1324
|
try {
|
|
1318
|
-
return JSON.stringify(val,
|
|
1325
|
+
return JSON.stringify(val, (k, v) => typeof v === 'bigint' ? String(v) : v, '\t');
|
|
1319
1326
|
}
|
|
1320
1327
|
catch (error) {
|
|
1321
1328
|
console.error(error);
|