mol_wire_lib 1.0.1056 → 1.0.1058
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.js +3 -3
- package/node.js.map +1 -1
- package/node.mjs +3 -3
- package/node.test.js +3 -3
- package/node.test.js.map +1 -1
- package/package.json +1 -1
package/node.mjs
CHANGED
|
@@ -1378,6 +1378,9 @@ var $;
|
|
|
1378
1378
|
if (typeof json === 'string') {
|
|
1379
1379
|
return $mol_tree2.data(json, [], span);
|
|
1380
1380
|
}
|
|
1381
|
+
if (typeof json.toJSON === 'function') {
|
|
1382
|
+
return $mol_tree2_from_json(json.toJSON());
|
|
1383
|
+
}
|
|
1381
1384
|
if (Array.isArray(json)) {
|
|
1382
1385
|
const sub = json.map(json => $mol_tree2_from_json(json, span));
|
|
1383
1386
|
return new $mol_tree2('/', '', sub, span);
|
|
@@ -1389,9 +1392,6 @@ var $;
|
|
|
1389
1392
|
if (json instanceof Date) {
|
|
1390
1393
|
return new $mol_tree2('', json.toISOString(), [], span);
|
|
1391
1394
|
}
|
|
1392
|
-
if (typeof json.toJSON === 'function') {
|
|
1393
|
-
return $mol_tree2_from_json(json.toJSON());
|
|
1394
|
-
}
|
|
1395
1395
|
if (json.toString !== Object.prototype.toString) {
|
|
1396
1396
|
return $mol_tree2.data(json.toString(), [], span);
|
|
1397
1397
|
}
|
package/node.test.js
CHANGED
|
@@ -1369,6 +1369,9 @@ var $;
|
|
|
1369
1369
|
if (typeof json === 'string') {
|
|
1370
1370
|
return $mol_tree2.data(json, [], span);
|
|
1371
1371
|
}
|
|
1372
|
+
if (typeof json.toJSON === 'function') {
|
|
1373
|
+
return $mol_tree2_from_json(json.toJSON());
|
|
1374
|
+
}
|
|
1372
1375
|
if (Array.isArray(json)) {
|
|
1373
1376
|
const sub = json.map(json => $mol_tree2_from_json(json, span));
|
|
1374
1377
|
return new $mol_tree2('/', '', sub, span);
|
|
@@ -1380,9 +1383,6 @@ var $;
|
|
|
1380
1383
|
if (json instanceof Date) {
|
|
1381
1384
|
return new $mol_tree2('', json.toISOString(), [], span);
|
|
1382
1385
|
}
|
|
1383
|
-
if (typeof json.toJSON === 'function') {
|
|
1384
|
-
return $mol_tree2_from_json(json.toJSON());
|
|
1385
|
-
}
|
|
1386
1386
|
if (json.toString !== Object.prototype.toString) {
|
|
1387
1387
|
return $mol_tree2.data(json.toString(), [], span);
|
|
1388
1388
|
}
|