mol_plot_all 1.2.129 → 1.2.133
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 +1 -10
- package/node.deps.json +1 -1
- package/node.esm.js +111 -78
- package/node.esm.js.map +1 -1
- package/node.js +111 -78
- package/node.js.map +1 -1
- package/node.test.js +138 -442
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.d.ts +1 -10
- package/web.deps.json +1 -1
- package/web.esm.js +111 -78
- package/web.esm.js.map +1 -1
- package/web.js +111 -78
- package/web.js.map +1 -1
- package/web.test.js +24 -361
- package/web.test.js.map +1 -1
package/node.esm.js
CHANGED
|
@@ -961,91 +961,125 @@ var $;
|
|
|
961
961
|
"use strict";
|
|
962
962
|
var $;
|
|
963
963
|
(function ($) {
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
964
|
+
let cache = new WeakMap();
|
|
965
|
+
function $mol_compare_deep(left, right) {
|
|
966
|
+
if (Object.is(left, right))
|
|
967
|
+
return true;
|
|
968
|
+
if (left === null)
|
|
969
|
+
return false;
|
|
970
|
+
if (right === null)
|
|
971
|
+
return false;
|
|
972
|
+
if (typeof left !== 'object')
|
|
973
|
+
return false;
|
|
974
|
+
if (typeof right !== 'object')
|
|
975
|
+
return false;
|
|
976
|
+
const left_proto = Reflect.getPrototypeOf(left);
|
|
977
|
+
const right_proto = Reflect.getPrototypeOf(right);
|
|
978
|
+
if (left_proto !== right_proto)
|
|
979
|
+
return false;
|
|
980
|
+
if (left instanceof Boolean)
|
|
981
|
+
return Object.is(left.valueOf(), right['valueOf']());
|
|
982
|
+
if (left instanceof Number)
|
|
983
|
+
return Object.is(left.valueOf(), right['valueOf']());
|
|
984
|
+
if (left instanceof String)
|
|
985
|
+
return Object.is(left.valueOf(), right['valueOf']());
|
|
986
|
+
if (left instanceof Date)
|
|
987
|
+
return Object.is(left.valueOf(), right['valueOf']());
|
|
988
|
+
if (left instanceof RegExp)
|
|
989
|
+
return left.source === right['source'] && left.flags === right['flags'];
|
|
990
|
+
let left_cache = cache.get(left);
|
|
991
|
+
if (left_cache) {
|
|
992
|
+
const right_cache = left_cache.get(right);
|
|
993
|
+
if (typeof right_cache === 'boolean')
|
|
994
|
+
return right_cache;
|
|
995
|
+
}
|
|
996
|
+
else {
|
|
997
|
+
left_cache = new WeakMap([[right, true]]);
|
|
998
|
+
cache.set(left, left_cache);
|
|
999
|
+
}
|
|
1000
|
+
let result;
|
|
988
1001
|
try {
|
|
989
|
-
|
|
1002
|
+
if (left_proto && !Reflect.getPrototypeOf(left_proto))
|
|
1003
|
+
result = compare_pojo(left, right);
|
|
1004
|
+
else if (Array.isArray(left))
|
|
1005
|
+
result = compare_array(left, right);
|
|
1006
|
+
else if (left instanceof Set)
|
|
1007
|
+
result = compare_set(left, right);
|
|
1008
|
+
else if (left instanceof Map)
|
|
1009
|
+
result = compare_map(left, right);
|
|
1010
|
+
else if (ArrayBuffer.isView(left))
|
|
1011
|
+
result = compare_buffer(left, right);
|
|
1012
|
+
else if (Symbol.toPrimitive in left)
|
|
1013
|
+
result = compare_primitive(left, right);
|
|
1014
|
+
else
|
|
1015
|
+
result = false;
|
|
990
1016
|
}
|
|
991
1017
|
finally {
|
|
992
|
-
|
|
1018
|
+
left_cache.set(right, result);
|
|
993
1019
|
}
|
|
1020
|
+
return result;
|
|
994
1021
|
}
|
|
995
|
-
$.$
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
if (!Object.is(source[i], target[i]))
|
|
1006
|
-
return target;
|
|
1007
|
-
}
|
|
1008
|
-
return source;
|
|
1022
|
+
$.$mol_compare_deep = $mol_compare_deep;
|
|
1023
|
+
function compare_array(left, right) {
|
|
1024
|
+
const len = left.length;
|
|
1025
|
+
if (len !== right.length)
|
|
1026
|
+
return false;
|
|
1027
|
+
for (let i = 0; i < len; ++i) {
|
|
1028
|
+
if (!$mol_compare_deep(left[i], right[i]))
|
|
1029
|
+
return false;
|
|
1030
|
+
}
|
|
1031
|
+
return true;
|
|
1009
1032
|
}
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
let equal = true;
|
|
1018
|
-
for (let key in target) {
|
|
1019
|
-
const conformed = $mol_conform(target[key], source[key]);
|
|
1020
|
-
if (conformed !== target[key]) {
|
|
1021
|
-
try {
|
|
1022
|
-
target[key] = conformed;
|
|
1023
|
-
}
|
|
1024
|
-
catch (error) { }
|
|
1025
|
-
if (!Object.is(conformed, target[key]))
|
|
1026
|
-
equal = false;
|
|
1027
|
-
}
|
|
1028
|
-
if (!Object.is(conformed, source[key]))
|
|
1029
|
-
equal = false;
|
|
1030
|
-
++count;
|
|
1033
|
+
function compare_buffer(left, right) {
|
|
1034
|
+
const len = left.byteLength;
|
|
1035
|
+
if (len !== right.byteLength)
|
|
1036
|
+
return false;
|
|
1037
|
+
for (let i = 0; i < len; ++i) {
|
|
1038
|
+
if (left[i] !== right[i])
|
|
1039
|
+
return false;
|
|
1031
1040
|
}
|
|
1032
|
-
|
|
1033
|
-
|
|
1041
|
+
return true;
|
|
1042
|
+
}
|
|
1043
|
+
function compare_iterator(left, right, compare) {
|
|
1044
|
+
while (true) {
|
|
1045
|
+
const left_next = left.next();
|
|
1046
|
+
const right_next = right.next();
|
|
1047
|
+
if (left_next.done !== right_next.done)
|
|
1048
|
+
return false;
|
|
1049
|
+
if (left_next.done)
|
|
1034
1050
|
break;
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1051
|
+
if (!compare(left_next.value, right_next.value))
|
|
1052
|
+
return false;
|
|
1053
|
+
}
|
|
1054
|
+
return true;
|
|
1055
|
+
}
|
|
1056
|
+
function compare_set(left, right) {
|
|
1057
|
+
if (left.size !== right.size)
|
|
1058
|
+
return false;
|
|
1059
|
+
return compare_iterator(left.values(), right.values(), $mol_compare_deep);
|
|
1060
|
+
}
|
|
1061
|
+
function compare_map(left, right) {
|
|
1062
|
+
if (left.size !== right.size)
|
|
1063
|
+
return false;
|
|
1064
|
+
return compare_iterator(left.keys(), right.keys(), Object.is)
|
|
1065
|
+
&& compare_iterator(left.values(), right.values(), $mol_compare_deep);
|
|
1066
|
+
}
|
|
1067
|
+
function compare_pojo(left, right) {
|
|
1068
|
+
const left_keys = Object.getOwnPropertyNames(left);
|
|
1069
|
+
const right_keys = Object.getOwnPropertyNames(right);
|
|
1070
|
+
if (left_keys.length !== right_keys.length)
|
|
1071
|
+
return false;
|
|
1072
|
+
for (let key of left_keys) {
|
|
1073
|
+
if (!$mol_compare_deep(left[key], Reflect.get(right, key)))
|
|
1074
|
+
return false;
|
|
1075
|
+
}
|
|
1076
|
+
return true;
|
|
1077
|
+
}
|
|
1078
|
+
function compare_primitive(left, right) {
|
|
1079
|
+
return Object.is(left[Symbol.toPrimitive]('default'), right[Symbol.toPrimitive]('default'));
|
|
1080
|
+
}
|
|
1047
1081
|
})($ || ($ = {}));
|
|
1048
|
-
//
|
|
1082
|
+
//deep.js.map
|
|
1049
1083
|
;
|
|
1050
1084
|
"use strict";
|
|
1051
1085
|
var $;
|
|
@@ -1372,8 +1406,7 @@ var $;
|
|
|
1372
1406
|
}
|
|
1373
1407
|
}
|
|
1374
1408
|
push(value) {
|
|
1375
|
-
|
|
1376
|
-
if (this.error !== null || !Object.is(this.value, value)) {
|
|
1409
|
+
if (this.error !== null || !$.$mol_compare_deep(this.value, value)) {
|
|
1377
1410
|
if ($mol_fiber.logs)
|
|
1378
1411
|
this.$.$mol_log3_done({
|
|
1379
1412
|
place: this,
|