mol_mutable 0.0.363 → 0.0.365
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.audit.js +1 -1
- package/node.deps.json +1 -1
- package/node.test.js +41 -65
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.audit.js +1 -1
- package/web.deps.json +1 -1
- package/web.test.js +32 -56
- package/web.test.js.map +1 -1
package/package.json
CHANGED
package/web.audit.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
console.info(
|
|
1
|
+
console.info( '%c ▫ $mol_build ▫ Audit passed', 'color:forestgreen; font-weight:bolder' )
|
package/web.deps.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"files":["mam.ts","LICENSE","README.md","yarn.lock","mam.jam.js","tsfmt.json","package.json","tsconfig.json","lang.lang.tree","meta.lang.tree","sandbox.config.json","mol/CNAME","mol/LICENSE","mol/readme.md","mol/index.html","mol/mol.meta.tree","mol/CONTRIBUTING.md","mol/CODE_OF_CONDUCT.md","mol/type/README.md","mol/type/immutable/deep/deep/deep.ts","mol/mutable/README.md","mol/mutable/mutable.ts"],"mods":{},"deps_in":{"mol":{"mol/mutable":-9007199254740991,"mol/type":-9007199254740991},"":{"mol":-9007199254740991},"mol/type/immutable/deep/deep":{"mol/mutable":-2},"mol/type/immutable/deep":{"mol/type/immutable/deep/deep":-9007199254740991},"mol/type/immutable":{"mol/type/immutable/deep":-9007199254740991},"mol/type":{"mol/type/immutable":-9007199254740991}},"deps_out":{"mol/mutable":{"mol":-9007199254740991,"mol/type/immutable/deep/deep":-2},"mol":{"":-9007199254740991},"mol/type/immutable/deep/deep":{"mol/type/immutable/deep":-9007199254740991},"mol/type/immutable/deep":{"mol/type/immutable":-9007199254740991},"mol/type/immutable":{"mol/type":-9007199254740991},"mol/type":{"mol":-9007199254740991}},"sloc":{"ts":51,"LICENSE":113,"md":511,"lock":
|
|
1
|
+
{"files":["mam.ts","LICENSE","README.md","yarn.lock","mam.jam.js","tsfmt.json","package.json","tsconfig.json","lang.lang.tree","meta.lang.tree","sandbox.config.json","mol/CNAME","mol/LICENSE","mol/readme.md","mol/index.html","mol/mol.meta.tree","mol/CONTRIBUTING.md","mol/CODE_OF_CONDUCT.md","mol/type/README.md","mol/type/immutable/deep/deep/deep.ts","mol/mutable/README.md","mol/mutable/mutable.ts"],"mods":{},"deps_in":{"mol":{"mol/mutable":-9007199254740991,"mol/type":-9007199254740991},"":{"mol":-9007199254740991},"mol/type/immutable/deep/deep":{"mol/mutable":-2},"mol/type/immutable/deep":{"mol/type/immutable/deep/deep":-9007199254740991},"mol/type/immutable":{"mol/type/immutable/deep":-9007199254740991},"mol/type":{"mol/type/immutable":-9007199254740991}},"deps_out":{"mol/mutable":{"mol":-9007199254740991,"mol/type/immutable/deep/deep":-2},"mol":{"":-9007199254740991},"mol/type/immutable/deep/deep":{"mol/type/immutable/deep":-9007199254740991},"mol/type/immutable/deep":{"mol/type/immutable":-9007199254740991},"mol/type/immutable":{"mol/type":-9007199254740991},"mol/type":{"mol":-9007199254740991}},"sloc":{"ts":51,"LICENSE":113,"md":511,"lock":944,"js":9,"json":92,"tree":41,"CNAME":1,"html":1},"deps":{"mol/mutable":{"..":-9007199254740991,"/mol/mutable/wrapper":-1,"/mol/type/immutable/deep":-2,"/mol/mutable":-1},"mol":{"..":-9007199254740991},"":{},"mol/type/immutable/deep/deep":{"..":-9007199254740991,"/mol/type/immutable/deep":-1},"mol/type/immutable/deep":{"..":-9007199254740991},"mol/type/immutable":{"..":-9007199254740991},"mol/type":{"..":-9007199254740991}}}
|
package/web.test.js
CHANGED
|
@@ -976,17 +976,6 @@ var $;
|
|
|
976
976
|
;
|
|
977
977
|
"use strict";
|
|
978
978
|
var $;
|
|
979
|
-
(function ($) {
|
|
980
|
-
function $mol_dom_serialize(node) {
|
|
981
|
-
const serializer = new $mol_dom_context.XMLSerializer;
|
|
982
|
-
return serializer.serializeToString(node);
|
|
983
|
-
}
|
|
984
|
-
$.$mol_dom_serialize = $mol_dom_serialize;
|
|
985
|
-
})($ || ($ = {}));
|
|
986
|
-
//mol/dom/serialize/serialize.ts
|
|
987
|
-
;
|
|
988
|
-
"use strict";
|
|
989
|
-
var $;
|
|
990
979
|
(function ($) {
|
|
991
980
|
function $mol_assert_ok(value) {
|
|
992
981
|
if (value)
|
|
@@ -1007,14 +996,12 @@ var $;
|
|
|
1007
996
|
handler();
|
|
1008
997
|
}
|
|
1009
998
|
catch (error) {
|
|
1010
|
-
if (!ErrorRight)
|
|
1011
|
-
return error;
|
|
1012
999
|
$.$mol_fail = fail;
|
|
1013
1000
|
if (typeof ErrorRight === 'string') {
|
|
1014
1001
|
$mol_assert_equal(error.message, ErrorRight);
|
|
1015
1002
|
}
|
|
1016
1003
|
else {
|
|
1017
|
-
$
|
|
1004
|
+
$mol_assert_equal(error instanceof ErrorRight, true);
|
|
1018
1005
|
}
|
|
1019
1006
|
return error;
|
|
1020
1007
|
}
|
|
@@ -1024,58 +1011,47 @@ var $;
|
|
|
1024
1011
|
$mol_fail(new Error('Not failed'));
|
|
1025
1012
|
}
|
|
1026
1013
|
$.$mol_assert_fail = $mol_assert_fail;
|
|
1027
|
-
function $
|
|
1028
|
-
|
|
1029
|
-
for (let j = 0; j < args.length; ++j) {
|
|
1030
|
-
if (i === j)
|
|
1031
|
-
continue;
|
|
1032
|
-
if (Number.isNaN(args[i]) && Number.isNaN(args[j]))
|
|
1033
|
-
continue;
|
|
1034
|
-
if (args[i] !== args[j])
|
|
1035
|
-
$mol_fail(new Error(`Not equal (${i + 1}:${j + 1})\n${args[i]}\n${args[j]}`));
|
|
1036
|
-
}
|
|
1037
|
-
}
|
|
1014
|
+
function $mol_assert_like(...args) {
|
|
1015
|
+
$mol_assert_equal(...args);
|
|
1038
1016
|
}
|
|
1039
|
-
$.$
|
|
1017
|
+
$.$mol_assert_like = $mol_assert_like;
|
|
1040
1018
|
function $mol_assert_unique(...args) {
|
|
1041
1019
|
for (let i = 0; i < args.length; ++i) {
|
|
1042
1020
|
for (let j = 0; j < args.length; ++j) {
|
|
1043
1021
|
if (i === j)
|
|
1044
1022
|
continue;
|
|
1045
|
-
if (
|
|
1046
|
-
|
|
1047
|
-
}
|
|
1023
|
+
if (!$mol_compare_deep(args[i], args[j]))
|
|
1024
|
+
continue;
|
|
1025
|
+
$mol_fail(new Error(`args[${i}] = args[${j}] = ${args[i]}`));
|
|
1048
1026
|
}
|
|
1049
1027
|
}
|
|
1050
1028
|
}
|
|
1051
1029
|
$.$mol_assert_unique = $mol_assert_unique;
|
|
1052
|
-
function $
|
|
1053
|
-
for (let
|
|
1054
|
-
if (
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
return val;
|
|
1060
|
-
if ('outerHTML' in val)
|
|
1061
|
-
return val.outerHTML;
|
|
1062
|
-
try {
|
|
1063
|
-
return JSON.stringify(val, (k, v) => typeof v === 'bigint' ? String(v) : v, '\t');
|
|
1064
|
-
}
|
|
1065
|
-
catch (error) {
|
|
1066
|
-
console.error(error);
|
|
1067
|
-
return val;
|
|
1068
|
-
}
|
|
1069
|
-
};
|
|
1070
|
-
return $mol_fail(new Error(`Not like (1:${+index + 2})\n${print(head)}\n---\n${print(value)}`));
|
|
1071
|
-
}
|
|
1030
|
+
function $mol_assert_equal(...args) {
|
|
1031
|
+
for (let i = 1; i < args.length; ++i) {
|
|
1032
|
+
if ($mol_compare_deep(args[0], args[i]))
|
|
1033
|
+
continue;
|
|
1034
|
+
if (args[0] instanceof $mol_dom_context.Element && args[i] instanceof $mol_dom_context.Element && args[0].outerHTML === args[i].outerHTML)
|
|
1035
|
+
continue;
|
|
1036
|
+
return $mol_fail(new Error(`args[0] ≠ args[${i}]\n${print(args[0])}\n---\n${print(args[i])}`));
|
|
1072
1037
|
}
|
|
1073
1038
|
}
|
|
1074
|
-
$.$
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1039
|
+
$.$mol_assert_equal = $mol_assert_equal;
|
|
1040
|
+
const print = (val) => {
|
|
1041
|
+
if (!val)
|
|
1042
|
+
return val;
|
|
1043
|
+
if (typeof val !== 'object')
|
|
1044
|
+
return val;
|
|
1045
|
+
if ('outerHTML' in val)
|
|
1046
|
+
return val.outerHTML;
|
|
1047
|
+
try {
|
|
1048
|
+
return JSON.stringify(val, (k, v) => typeof v === 'bigint' ? String(v) : v, '\t');
|
|
1049
|
+
}
|
|
1050
|
+
catch (error) {
|
|
1051
|
+
console.error(error);
|
|
1052
|
+
return val;
|
|
1053
|
+
}
|
|
1054
|
+
};
|
|
1079
1055
|
})($ || ($ = {}));
|
|
1080
1056
|
//mol/assert/assert.ts
|
|
1081
1057
|
;
|
|
@@ -1096,10 +1072,10 @@ var $;
|
|
|
1096
1072
|
$mol_assert_equal(2, 2, 2);
|
|
1097
1073
|
},
|
|
1098
1074
|
'two must be unique'() {
|
|
1099
|
-
$mol_assert_unique([
|
|
1075
|
+
$mol_assert_unique([2], [3]);
|
|
1100
1076
|
},
|
|
1101
1077
|
'three must be unique'() {
|
|
1102
|
-
$mol_assert_unique([
|
|
1078
|
+
$mol_assert_unique([1], [2], [3]);
|
|
1103
1079
|
},
|
|
1104
1080
|
'two must be alike'() {
|
|
1105
1081
|
$mol_assert_like([3], [3]);
|