mol_tree2 1.0.735 → 1.0.736
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/web.js +3 -3
- package/web.js.map +1 -1
- package/web.mjs +3 -3
package/node.mjs
CHANGED
|
@@ -613,6 +613,9 @@ var $;
|
|
|
613
613
|
if (typeof json === 'string') {
|
|
614
614
|
return $mol_tree2.data(json, [], span);
|
|
615
615
|
}
|
|
616
|
+
if (typeof json.toJSON === 'function') {
|
|
617
|
+
return $mol_tree2_from_json(json.toJSON());
|
|
618
|
+
}
|
|
616
619
|
if (Array.isArray(json)) {
|
|
617
620
|
const sub = json.map(json => $mol_tree2_from_json(json, span));
|
|
618
621
|
return new $mol_tree2('/', '', sub, span);
|
|
@@ -624,9 +627,6 @@ var $;
|
|
|
624
627
|
if (json instanceof Date) {
|
|
625
628
|
return new $mol_tree2('', json.toISOString(), [], span);
|
|
626
629
|
}
|
|
627
|
-
if (typeof json.toJSON === 'function') {
|
|
628
|
-
return $mol_tree2_from_json(json.toJSON());
|
|
629
|
-
}
|
|
630
630
|
if (json.toString !== Object.prototype.toString) {
|
|
631
631
|
return $mol_tree2.data(json.toString(), [], span);
|
|
632
632
|
}
|
package/node.test.js
CHANGED
|
@@ -604,6 +604,9 @@ var $;
|
|
|
604
604
|
if (typeof json === 'string') {
|
|
605
605
|
return $mol_tree2.data(json, [], span);
|
|
606
606
|
}
|
|
607
|
+
if (typeof json.toJSON === 'function') {
|
|
608
|
+
return $mol_tree2_from_json(json.toJSON());
|
|
609
|
+
}
|
|
607
610
|
if (Array.isArray(json)) {
|
|
608
611
|
const sub = json.map(json => $mol_tree2_from_json(json, span));
|
|
609
612
|
return new $mol_tree2('/', '', sub, span);
|
|
@@ -615,9 +618,6 @@ var $;
|
|
|
615
618
|
if (json instanceof Date) {
|
|
616
619
|
return new $mol_tree2('', json.toISOString(), [], span);
|
|
617
620
|
}
|
|
618
|
-
if (typeof json.toJSON === 'function') {
|
|
619
|
-
return $mol_tree2_from_json(json.toJSON());
|
|
620
|
-
}
|
|
621
621
|
if (json.toString !== Object.prototype.toString) {
|
|
622
622
|
return $mol_tree2.data(json.toString(), [], span);
|
|
623
623
|
}
|