mol_jsx_lib 0.0.921 → 0.0.923
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
|
@@ -743,6 +743,9 @@ var $;
|
|
|
743
743
|
if (typeof json === 'string') {
|
|
744
744
|
return $mol_tree2.data(json, [], span);
|
|
745
745
|
}
|
|
746
|
+
if (typeof json.toJSON === 'function') {
|
|
747
|
+
return $mol_tree2_from_json(json.toJSON());
|
|
748
|
+
}
|
|
746
749
|
if (Array.isArray(json)) {
|
|
747
750
|
const sub = json.map(json => $mol_tree2_from_json(json, span));
|
|
748
751
|
return new $mol_tree2('/', '', sub, span);
|
|
@@ -754,9 +757,6 @@ var $;
|
|
|
754
757
|
if (json instanceof Date) {
|
|
755
758
|
return new $mol_tree2('', json.toISOString(), [], span);
|
|
756
759
|
}
|
|
757
|
-
if (typeof json.toJSON === 'function') {
|
|
758
|
-
return $mol_tree2_from_json(json.toJSON());
|
|
759
|
-
}
|
|
760
760
|
if (json.toString !== Object.prototype.toString) {
|
|
761
761
|
return $mol_tree2.data(json.toString(), [], span);
|
|
762
762
|
}
|
package/node.test.js
CHANGED
|
@@ -734,6 +734,9 @@ var $;
|
|
|
734
734
|
if (typeof json === 'string') {
|
|
735
735
|
return $mol_tree2.data(json, [], span);
|
|
736
736
|
}
|
|
737
|
+
if (typeof json.toJSON === 'function') {
|
|
738
|
+
return $mol_tree2_from_json(json.toJSON());
|
|
739
|
+
}
|
|
737
740
|
if (Array.isArray(json)) {
|
|
738
741
|
const sub = json.map(json => $mol_tree2_from_json(json, span));
|
|
739
742
|
return new $mol_tree2('/', '', sub, span);
|
|
@@ -745,9 +748,6 @@ var $;
|
|
|
745
748
|
if (json instanceof Date) {
|
|
746
749
|
return new $mol_tree2('', json.toISOString(), [], span);
|
|
747
750
|
}
|
|
748
|
-
if (typeof json.toJSON === 'function') {
|
|
749
|
-
return $mol_tree2_from_json(json.toJSON());
|
|
750
|
-
}
|
|
751
751
|
if (json.toString !== Object.prototype.toString) {
|
|
752
752
|
return $mol_tree2.data(json.toString(), [], span);
|
|
753
753
|
}
|