mol_plot_all 1.2.1137 → 1.2.1139
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.d.ts +90 -90
- package/node.deps.json +1 -1
- package/node.js +2 -1
- package/node.js.map +1 -1
- package/node.mjs +2 -1
- package/node.test.js +16 -1
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.d.ts +90 -90
- package/web.deps.json +1 -1
- package/web.js +2 -1
- package/web.js.map +1 -1
- package/web.mjs +2 -1
- package/web.test.js +14 -0
- package/web.test.js.map +1 -1
package/web.mjs
CHANGED
|
@@ -996,9 +996,10 @@ var $;
|
|
|
996
996
|
return right_cache;
|
|
997
997
|
}
|
|
998
998
|
else {
|
|
999
|
-
left_cache = new WeakMap(
|
|
999
|
+
left_cache = new WeakMap();
|
|
1000
1000
|
$.$mol_compare_deep_cache.set(left, left_cache);
|
|
1001
1001
|
}
|
|
1002
|
+
left_cache.set(right, true);
|
|
1002
1003
|
let result;
|
|
1003
1004
|
try {
|
|
1004
1005
|
if (!left_proto)
|
package/web.test.js
CHANGED
|
@@ -660,6 +660,20 @@ var $;
|
|
|
660
660
|
b['self'] = b;
|
|
661
661
|
$mol_assert_ok($mol_compare_deep(a, b));
|
|
662
662
|
},
|
|
663
|
+
'same POJOs with cyclic reference with cache warmup'() {
|
|
664
|
+
const obj1 = { test: 1, obj3: null };
|
|
665
|
+
const obj1_copy = { test: 1, obj3: null };
|
|
666
|
+
const obj2 = { test: 2, obj1 };
|
|
667
|
+
const obj2_copy = { test: 2, obj1: obj1_copy };
|
|
668
|
+
const obj3 = { test: 3, obj2 };
|
|
669
|
+
const obj3_copy = { test: 3, obj2: obj2_copy };
|
|
670
|
+
obj1.obj3 = obj3;
|
|
671
|
+
obj1_copy.obj3 = obj3_copy;
|
|
672
|
+
$mol_assert_not($mol_compare_deep(obj1, {}));
|
|
673
|
+
$mol_assert_not($mol_compare_deep(obj2, {}));
|
|
674
|
+
$mol_assert_not($mol_compare_deep(obj3, {}));
|
|
675
|
+
$mol_assert_ok($mol_compare_deep(obj3, obj3_copy));
|
|
676
|
+
},
|
|
663
677
|
'Date'() {
|
|
664
678
|
$mol_assert_ok($mol_compare_deep(new Date(12345), new Date(12345)));
|
|
665
679
|
$mol_assert_not($mol_compare_deep(new Date(12345), new Date(12346)));
|