mol_tree2 1.0.212 → 1.0.213
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.test.js +299 -299
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.test.js +246 -246
- package/web.test.js.map +1 -1
package/package.json
CHANGED
package/web.test.js
CHANGED
|
@@ -165,25 +165,25 @@ var $;
|
|
|
165
165
|
//mol/dom/render/children/children.ts
|
|
166
166
|
;
|
|
167
167
|
"use strict";
|
|
168
|
-
//mol/type/
|
|
168
|
+
//mol/type/partial/deep/deep.ts
|
|
169
169
|
;
|
|
170
170
|
"use strict";
|
|
171
|
-
//mol/type/
|
|
171
|
+
//mol/type/error/error.ts
|
|
172
172
|
;
|
|
173
173
|
"use strict";
|
|
174
174
|
//mol/type/assert/assert.ts
|
|
175
175
|
;
|
|
176
176
|
"use strict";
|
|
177
|
-
//mol/type/
|
|
177
|
+
//mol/type/assert/assert.test.ts
|
|
178
178
|
;
|
|
179
179
|
"use strict";
|
|
180
180
|
//mol/type/equals/equals.ts
|
|
181
181
|
;
|
|
182
182
|
"use strict";
|
|
183
|
-
//mol/type/
|
|
183
|
+
//mol/type/equals/equals.test.ts
|
|
184
184
|
;
|
|
185
185
|
"use strict";
|
|
186
|
-
//mol/type/partial/deep/deep.ts
|
|
186
|
+
//mol/type/partial/deep/deep.test.ts
|
|
187
187
|
;
|
|
188
188
|
"use strict";
|
|
189
189
|
var $;
|
|
@@ -630,38 +630,6 @@ var $;
|
|
|
630
630
|
;
|
|
631
631
|
"use strict";
|
|
632
632
|
var $;
|
|
633
|
-
(function ($) {
|
|
634
|
-
$mol_test({
|
|
635
|
-
'must be false'() {
|
|
636
|
-
$mol_assert_not(0);
|
|
637
|
-
},
|
|
638
|
-
'must be true'() {
|
|
639
|
-
$mol_assert_ok(1);
|
|
640
|
-
},
|
|
641
|
-
'two must be equal'() {
|
|
642
|
-
$mol_assert_equal(2, 2);
|
|
643
|
-
},
|
|
644
|
-
'three must be equal'() {
|
|
645
|
-
$mol_assert_equal(2, 2, 2);
|
|
646
|
-
},
|
|
647
|
-
'two must be unique'() {
|
|
648
|
-
$mol_assert_unique([3], [3]);
|
|
649
|
-
},
|
|
650
|
-
'three must be unique'() {
|
|
651
|
-
$mol_assert_unique([3], [3], [3]);
|
|
652
|
-
},
|
|
653
|
-
'two must be alike'() {
|
|
654
|
-
$mol_assert_like([3], [3]);
|
|
655
|
-
},
|
|
656
|
-
'three must be alike'() {
|
|
657
|
-
$mol_assert_like([3], [3], [3]);
|
|
658
|
-
},
|
|
659
|
-
});
|
|
660
|
-
})($ || ($ = {}));
|
|
661
|
-
//mol/assert/assert.test.ts
|
|
662
|
-
;
|
|
663
|
-
"use strict";
|
|
664
|
-
var $;
|
|
665
633
|
(function ($) {
|
|
666
634
|
function $mol_assert_ok(value) {
|
|
667
635
|
if (value)
|
|
@@ -756,6 +724,157 @@ var $;
|
|
|
756
724
|
;
|
|
757
725
|
"use strict";
|
|
758
726
|
var $;
|
|
727
|
+
(function ($) {
|
|
728
|
+
$mol_test({
|
|
729
|
+
'must be false'() {
|
|
730
|
+
$mol_assert_not(0);
|
|
731
|
+
},
|
|
732
|
+
'must be true'() {
|
|
733
|
+
$mol_assert_ok(1);
|
|
734
|
+
},
|
|
735
|
+
'two must be equal'() {
|
|
736
|
+
$mol_assert_equal(2, 2);
|
|
737
|
+
},
|
|
738
|
+
'three must be equal'() {
|
|
739
|
+
$mol_assert_equal(2, 2, 2);
|
|
740
|
+
},
|
|
741
|
+
'two must be unique'() {
|
|
742
|
+
$mol_assert_unique([3], [3]);
|
|
743
|
+
},
|
|
744
|
+
'three must be unique'() {
|
|
745
|
+
$mol_assert_unique([3], [3], [3]);
|
|
746
|
+
},
|
|
747
|
+
'two must be alike'() {
|
|
748
|
+
$mol_assert_like([3], [3]);
|
|
749
|
+
},
|
|
750
|
+
'three must be alike'() {
|
|
751
|
+
$mol_assert_like([3], [3], [3]);
|
|
752
|
+
},
|
|
753
|
+
});
|
|
754
|
+
})($ || ($ = {}));
|
|
755
|
+
//mol/assert/assert.test.ts
|
|
756
|
+
;
|
|
757
|
+
"use strict";
|
|
758
|
+
var $;
|
|
759
|
+
(function ($) {
|
|
760
|
+
function $mol_log3_area_lazy(event) {
|
|
761
|
+
const self = this;
|
|
762
|
+
const stack = self.$mol_log3_stack;
|
|
763
|
+
const deep = stack.length;
|
|
764
|
+
let logged = false;
|
|
765
|
+
stack.push(() => {
|
|
766
|
+
logged = true;
|
|
767
|
+
self.$mol_log3_area.call(self, event);
|
|
768
|
+
});
|
|
769
|
+
return () => {
|
|
770
|
+
if (logged)
|
|
771
|
+
self.console.groupEnd();
|
|
772
|
+
if (stack.length > deep)
|
|
773
|
+
stack.length = deep;
|
|
774
|
+
};
|
|
775
|
+
}
|
|
776
|
+
$.$mol_log3_area_lazy = $mol_log3_area_lazy;
|
|
777
|
+
$.$mol_log3_stack = [];
|
|
778
|
+
})($ || ($ = {}));
|
|
779
|
+
//mol/log3/log3.ts
|
|
780
|
+
;
|
|
781
|
+
"use strict";
|
|
782
|
+
//mol/type/keys/extract/extract.ts
|
|
783
|
+
;
|
|
784
|
+
"use strict";
|
|
785
|
+
//mol/type/keys/extract/extract.test.ts
|
|
786
|
+
;
|
|
787
|
+
"use strict";
|
|
788
|
+
var $;
|
|
789
|
+
(function ($_1) {
|
|
790
|
+
$mol_test_mocks.push($ => {
|
|
791
|
+
$.$mol_log3_come = () => { };
|
|
792
|
+
$.$mol_log3_done = () => { };
|
|
793
|
+
$.$mol_log3_fail = () => { };
|
|
794
|
+
$.$mol_log3_warn = () => { };
|
|
795
|
+
$.$mol_log3_rise = () => { };
|
|
796
|
+
$.$mol_log3_area = () => () => { };
|
|
797
|
+
});
|
|
798
|
+
})($ || ($ = {}));
|
|
799
|
+
//mol/log3/log3.test.ts
|
|
800
|
+
;
|
|
801
|
+
"use strict";
|
|
802
|
+
var $;
|
|
803
|
+
(function ($) {
|
|
804
|
+
function $mol_log3_web_make(level, color) {
|
|
805
|
+
return function $mol_log3_logger(event) {
|
|
806
|
+
const pending = this.$mol_log3_stack.pop();
|
|
807
|
+
if (pending)
|
|
808
|
+
pending();
|
|
809
|
+
let tpl = '%c';
|
|
810
|
+
const chunks = Object.values(event);
|
|
811
|
+
for (let i = 0; i < chunks.length; ++i) {
|
|
812
|
+
tpl += (typeof chunks[i] === 'string') ? ' ⦙ %s' : ' ⦙ %o';
|
|
813
|
+
}
|
|
814
|
+
const style = `color:${color};font-weight:bolder`;
|
|
815
|
+
this.console[level](tpl, style, ...chunks);
|
|
816
|
+
const self = this;
|
|
817
|
+
return () => self.console.groupEnd();
|
|
818
|
+
};
|
|
819
|
+
}
|
|
820
|
+
$.$mol_log3_web_make = $mol_log3_web_make;
|
|
821
|
+
$.$mol_log3_come = $mol_log3_web_make('info', 'royalblue');
|
|
822
|
+
$.$mol_log3_done = $mol_log3_web_make('info', 'forestgreen');
|
|
823
|
+
$.$mol_log3_fail = $mol_log3_web_make('error', 'orangered');
|
|
824
|
+
$.$mol_log3_warn = $mol_log3_web_make('warn', 'goldenrod');
|
|
825
|
+
$.$mol_log3_rise = $mol_log3_web_make('log', 'magenta');
|
|
826
|
+
$.$mol_log3_area = $mol_log3_web_make('group', 'cyan');
|
|
827
|
+
})($ || ($ = {}));
|
|
828
|
+
//mol/log3/log3.web.ts
|
|
829
|
+
;
|
|
830
|
+
"use strict";
|
|
831
|
+
var $;
|
|
832
|
+
(function ($) {
|
|
833
|
+
const named = new WeakSet();
|
|
834
|
+
function $mol_func_name(func) {
|
|
835
|
+
let name = func.name;
|
|
836
|
+
if (name?.length > 1)
|
|
837
|
+
return name;
|
|
838
|
+
if (named.has(func))
|
|
839
|
+
return name;
|
|
840
|
+
for (let key in this) {
|
|
841
|
+
try {
|
|
842
|
+
if (this[key] !== func)
|
|
843
|
+
continue;
|
|
844
|
+
name = key;
|
|
845
|
+
Object.defineProperty(func, 'name', { value: name });
|
|
846
|
+
break;
|
|
847
|
+
}
|
|
848
|
+
catch { }
|
|
849
|
+
}
|
|
850
|
+
named.add(func);
|
|
851
|
+
return name;
|
|
852
|
+
}
|
|
853
|
+
$.$mol_func_name = $mol_func_name;
|
|
854
|
+
function $mol_func_name_from(target, source) {
|
|
855
|
+
Object.defineProperty(target, 'name', { value: source.name });
|
|
856
|
+
return target;
|
|
857
|
+
}
|
|
858
|
+
$.$mol_func_name_from = $mol_func_name_from;
|
|
859
|
+
})($ || ($ = {}));
|
|
860
|
+
//mol/func/name/name.ts
|
|
861
|
+
;
|
|
862
|
+
"use strict";
|
|
863
|
+
var $;
|
|
864
|
+
(function ($_1) {
|
|
865
|
+
$mol_test({
|
|
866
|
+
'FQN of anon function'($) {
|
|
867
|
+
const $$ = Object.assign($, { $mol_func_name_test: (() => () => { })() });
|
|
868
|
+
$mol_assert_equal($$.$mol_func_name_test.name, '');
|
|
869
|
+
$mol_assert_equal($$.$mol_func_name($$.$mol_func_name_test), '$mol_func_name_test');
|
|
870
|
+
$mol_assert_equal($$.$mol_func_name_test.name, '$mol_func_name_test');
|
|
871
|
+
},
|
|
872
|
+
});
|
|
873
|
+
})($ || ($ = {}));
|
|
874
|
+
//mol/func/name/name.test.ts
|
|
875
|
+
;
|
|
876
|
+
"use strict";
|
|
877
|
+
var $;
|
|
759
878
|
(function ($) {
|
|
760
879
|
$mol_test({
|
|
761
880
|
'get'() {
|
|
@@ -874,6 +993,64 @@ var $;
|
|
|
874
993
|
;
|
|
875
994
|
"use strict";
|
|
876
995
|
var $;
|
|
996
|
+
(function ($_1) {
|
|
997
|
+
$mol_test({
|
|
998
|
+
'inserting'($) {
|
|
999
|
+
$mol_assert_equal($.$mol_tree2_from_string('a b c d\n')
|
|
1000
|
+
.insert($mol_tree2.struct('x'), 'a', 'b', 'c')
|
|
1001
|
+
.toString(), 'a b x\n');
|
|
1002
|
+
$mol_assert_equal($.$mol_tree2_from_string('a b\n')
|
|
1003
|
+
.insert($mol_tree2.struct('x'), 'a', 'b', 'c', 'd')
|
|
1004
|
+
.toString(), 'a b c x\n');
|
|
1005
|
+
$mol_assert_equal($.$mol_tree2_from_string('a b c d\n')
|
|
1006
|
+
.insert($mol_tree2.struct('x'), 0, 0, 0)
|
|
1007
|
+
.toString(), 'a b x\n');
|
|
1008
|
+
$mol_assert_equal($.$mol_tree2_from_string('a b\n')
|
|
1009
|
+
.insert($mol_tree2.struct('x'), 0, 0, 0, 0)
|
|
1010
|
+
.toString(), 'a b \\\n\tx\n');
|
|
1011
|
+
$mol_assert_equal($.$mol_tree2_from_string('a b c d\n')
|
|
1012
|
+
.insert($mol_tree2.struct('x'), null, null, null)
|
|
1013
|
+
.toString(), 'a b x\n');
|
|
1014
|
+
$mol_assert_equal($.$mol_tree2_from_string('a b\n')
|
|
1015
|
+
.insert($mol_tree2.struct('x'), null, null, null, null)
|
|
1016
|
+
.toString(), 'a b \\\n\tx\n');
|
|
1017
|
+
},
|
|
1018
|
+
'deleting'($) {
|
|
1019
|
+
$mol_assert_equal($.$mol_tree2_from_string('a b c d\n')
|
|
1020
|
+
.insert(null, 'a', 'b', 'c')
|
|
1021
|
+
.toString(), 'a b\n');
|
|
1022
|
+
$mol_assert_equal($.$mol_tree2_from_string('a b c d\n')
|
|
1023
|
+
.insert(null, 0, 0, 0)
|
|
1024
|
+
.toString(), 'a b\n');
|
|
1025
|
+
},
|
|
1026
|
+
'hack'($) {
|
|
1027
|
+
const res = $.$mol_tree2_from_string(`foo bar xxx\n`)
|
|
1028
|
+
.hack({
|
|
1029
|
+
'bar': (input, belt) => [input.struct('777', input.hack(belt))],
|
|
1030
|
+
});
|
|
1031
|
+
$mol_assert_equal(res.toString(), 'foo 777 xxx\n');
|
|
1032
|
+
},
|
|
1033
|
+
});
|
|
1034
|
+
})($ || ($ = {}));
|
|
1035
|
+
//mol/tree2/tree2.test.ts
|
|
1036
|
+
;
|
|
1037
|
+
"use strict";
|
|
1038
|
+
var $;
|
|
1039
|
+
(function ($) {
|
|
1040
|
+
$mol_test({
|
|
1041
|
+
'fromJSON'() {
|
|
1042
|
+
$mol_assert_equal($mol_tree2_from_json([]).toString(), '/\n');
|
|
1043
|
+
$mol_assert_equal($mol_tree2_from_json([false, true]).toString(), '/\n\tfalse\n\ttrue\n');
|
|
1044
|
+
$mol_assert_equal($mol_tree2_from_json([0, 1, 2.3]).toString(), '/\n\t0\n\t1\n\t2.3\n');
|
|
1045
|
+
$mol_assert_equal($mol_tree2_from_json(['', 'foo', 'bar\nbaz']).toString(), '/\n\t\\\n\t\\foo\n\t\\\n\t\t\\bar\n\t\t\\baz\n');
|
|
1046
|
+
$mol_assert_equal($mol_tree2_from_json({ 'foo': false, 'bar\nbaz': 'lol' }).toString(), '*\n\tfoo false\n\t\\\n\t\t\\bar\n\t\t\\baz\n\t\t\\lol\n');
|
|
1047
|
+
},
|
|
1048
|
+
});
|
|
1049
|
+
})($ || ($ = {}));
|
|
1050
|
+
//mol/tree2/from/json/json.test.ts
|
|
1051
|
+
;
|
|
1052
|
+
"use strict";
|
|
1053
|
+
var $;
|
|
877
1054
|
(function ($_1) {
|
|
878
1055
|
$mol_test({
|
|
879
1056
|
'tree parsing'($) {
|
|
@@ -937,199 +1114,35 @@ var $;
|
|
|
937
1114
|
//mol/tree2/from/string/string.test.ts
|
|
938
1115
|
;
|
|
939
1116
|
"use strict";
|
|
940
|
-
|
|
941
|
-
(function ($) {
|
|
942
|
-
function $mol_log3_area_lazy(event) {
|
|
943
|
-
const self = this;
|
|
944
|
-
const stack = self.$mol_log3_stack;
|
|
945
|
-
const deep = stack.length;
|
|
946
|
-
let logged = false;
|
|
947
|
-
stack.push(() => {
|
|
948
|
-
logged = true;
|
|
949
|
-
self.$mol_log3_area.call(self, event);
|
|
950
|
-
});
|
|
951
|
-
return () => {
|
|
952
|
-
if (logged)
|
|
953
|
-
self.console.groupEnd();
|
|
954
|
-
if (stack.length > deep)
|
|
955
|
-
stack.length = deep;
|
|
956
|
-
};
|
|
957
|
-
}
|
|
958
|
-
$.$mol_log3_area_lazy = $mol_log3_area_lazy;
|
|
959
|
-
$.$mol_log3_stack = [];
|
|
960
|
-
})($ || ($ = {}));
|
|
961
|
-
//mol/log3/log3.ts
|
|
1117
|
+
//mol/type/unary/unary.ts
|
|
962
1118
|
;
|
|
963
1119
|
"use strict";
|
|
964
|
-
//mol/type/
|
|
1120
|
+
//mol/type/param/param.ts
|
|
965
1121
|
;
|
|
966
1122
|
"use strict";
|
|
967
|
-
//mol/type/
|
|
1123
|
+
//mol/type/param/param.test.ts
|
|
968
1124
|
;
|
|
969
1125
|
"use strict";
|
|
970
|
-
|
|
971
|
-
(function ($_1) {
|
|
972
|
-
$mol_test_mocks.push($ => {
|
|
973
|
-
$.$mol_log3_come = () => { };
|
|
974
|
-
$.$mol_log3_done = () => { };
|
|
975
|
-
$.$mol_log3_fail = () => { };
|
|
976
|
-
$.$mol_log3_warn = () => { };
|
|
977
|
-
$.$mol_log3_rise = () => { };
|
|
978
|
-
$.$mol_log3_area = () => () => { };
|
|
979
|
-
});
|
|
980
|
-
})($ || ($ = {}));
|
|
981
|
-
//mol/log3/log3.test.ts
|
|
1126
|
+
//mol/type/tail/tail.ts
|
|
982
1127
|
;
|
|
983
1128
|
"use strict";
|
|
984
|
-
|
|
985
|
-
(function ($) {
|
|
986
|
-
function $mol_log3_web_make(level, color) {
|
|
987
|
-
return function $mol_log3_logger(event) {
|
|
988
|
-
const pending = this.$mol_log3_stack.pop();
|
|
989
|
-
if (pending)
|
|
990
|
-
pending();
|
|
991
|
-
let tpl = '%c';
|
|
992
|
-
const chunks = Object.values(event);
|
|
993
|
-
for (let i = 0; i < chunks.length; ++i) {
|
|
994
|
-
tpl += (typeof chunks[i] === 'string') ? ' ⦙ %s' : ' ⦙ %o';
|
|
995
|
-
}
|
|
996
|
-
const style = `color:${color};font-weight:bolder`;
|
|
997
|
-
this.console[level](tpl, style, ...chunks);
|
|
998
|
-
const self = this;
|
|
999
|
-
return () => self.console.groupEnd();
|
|
1000
|
-
};
|
|
1001
|
-
}
|
|
1002
|
-
$.$mol_log3_web_make = $mol_log3_web_make;
|
|
1003
|
-
$.$mol_log3_come = $mol_log3_web_make('info', 'royalblue');
|
|
1004
|
-
$.$mol_log3_done = $mol_log3_web_make('info', 'forestgreen');
|
|
1005
|
-
$.$mol_log3_fail = $mol_log3_web_make('error', 'orangered');
|
|
1006
|
-
$.$mol_log3_warn = $mol_log3_web_make('warn', 'goldenrod');
|
|
1007
|
-
$.$mol_log3_rise = $mol_log3_web_make('log', 'magenta');
|
|
1008
|
-
$.$mol_log3_area = $mol_log3_web_make('group', 'cyan');
|
|
1009
|
-
})($ || ($ = {}));
|
|
1010
|
-
//mol/log3/log3.web.ts
|
|
1129
|
+
//mol/type/tail/tail.test.ts
|
|
1011
1130
|
;
|
|
1012
1131
|
"use strict";
|
|
1013
|
-
|
|
1014
|
-
(function ($_1) {
|
|
1015
|
-
$mol_test({
|
|
1016
|
-
'FQN of anon function'($) {
|
|
1017
|
-
const $$ = Object.assign($, { $mol_func_name_test: (() => () => { })() });
|
|
1018
|
-
$mol_assert_equal($$.$mol_func_name_test.name, '');
|
|
1019
|
-
$mol_assert_equal($$.$mol_func_name($$.$mol_func_name_test), '$mol_func_name_test');
|
|
1020
|
-
$mol_assert_equal($$.$mol_func_name_test.name, '$mol_func_name_test');
|
|
1021
|
-
},
|
|
1022
|
-
});
|
|
1023
|
-
})($ || ($ = {}));
|
|
1024
|
-
//mol/func/name/name.test.ts
|
|
1132
|
+
//mol/data/value/value.ts
|
|
1025
1133
|
;
|
|
1026
1134
|
"use strict";
|
|
1027
1135
|
var $;
|
|
1028
1136
|
(function ($) {
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
if (named.has(func))
|
|
1035
|
-
return name;
|
|
1036
|
-
for (let key in this) {
|
|
1037
|
-
try {
|
|
1038
|
-
if (this[key] !== func)
|
|
1039
|
-
continue;
|
|
1040
|
-
name = key;
|
|
1041
|
-
Object.defineProperty(func, 'name', { value: name });
|
|
1042
|
-
break;
|
|
1043
|
-
}
|
|
1044
|
-
catch { }
|
|
1045
|
-
}
|
|
1046
|
-
named.add(func);
|
|
1047
|
-
return name;
|
|
1048
|
-
}
|
|
1049
|
-
$.$mol_func_name = $mol_func_name;
|
|
1050
|
-
function $mol_func_name_from(target, source) {
|
|
1051
|
-
Object.defineProperty(target, 'name', { value: source.name });
|
|
1052
|
-
return target;
|
|
1137
|
+
function $mol_data_setup(value, config) {
|
|
1138
|
+
return Object.assign(value, {
|
|
1139
|
+
config,
|
|
1140
|
+
Value: null
|
|
1141
|
+
});
|
|
1053
1142
|
}
|
|
1054
|
-
$.$
|
|
1055
|
-
})($ || ($ = {}));
|
|
1056
|
-
//mol/func/name/name.ts
|
|
1057
|
-
;
|
|
1058
|
-
"use strict";
|
|
1059
|
-
var $;
|
|
1060
|
-
(function ($_1) {
|
|
1061
|
-
$mol_test({
|
|
1062
|
-
'inserting'($) {
|
|
1063
|
-
$mol_assert_equal($.$mol_tree2_from_string('a b c d\n')
|
|
1064
|
-
.insert($mol_tree2.struct('x'), 'a', 'b', 'c')
|
|
1065
|
-
.toString(), 'a b x\n');
|
|
1066
|
-
$mol_assert_equal($.$mol_tree2_from_string('a b\n')
|
|
1067
|
-
.insert($mol_tree2.struct('x'), 'a', 'b', 'c', 'd')
|
|
1068
|
-
.toString(), 'a b c x\n');
|
|
1069
|
-
$mol_assert_equal($.$mol_tree2_from_string('a b c d\n')
|
|
1070
|
-
.insert($mol_tree2.struct('x'), 0, 0, 0)
|
|
1071
|
-
.toString(), 'a b x\n');
|
|
1072
|
-
$mol_assert_equal($.$mol_tree2_from_string('a b\n')
|
|
1073
|
-
.insert($mol_tree2.struct('x'), 0, 0, 0, 0)
|
|
1074
|
-
.toString(), 'a b \\\n\tx\n');
|
|
1075
|
-
$mol_assert_equal($.$mol_tree2_from_string('a b c d\n')
|
|
1076
|
-
.insert($mol_tree2.struct('x'), null, null, null)
|
|
1077
|
-
.toString(), 'a b x\n');
|
|
1078
|
-
$mol_assert_equal($.$mol_tree2_from_string('a b\n')
|
|
1079
|
-
.insert($mol_tree2.struct('x'), null, null, null, null)
|
|
1080
|
-
.toString(), 'a b \\\n\tx\n');
|
|
1081
|
-
},
|
|
1082
|
-
'deleting'($) {
|
|
1083
|
-
$mol_assert_equal($.$mol_tree2_from_string('a b c d\n')
|
|
1084
|
-
.insert(null, 'a', 'b', 'c')
|
|
1085
|
-
.toString(), 'a b\n');
|
|
1086
|
-
$mol_assert_equal($.$mol_tree2_from_string('a b c d\n')
|
|
1087
|
-
.insert(null, 0, 0, 0)
|
|
1088
|
-
.toString(), 'a b\n');
|
|
1089
|
-
},
|
|
1090
|
-
'hack'($) {
|
|
1091
|
-
const res = $.$mol_tree2_from_string(`foo bar xxx\n`)
|
|
1092
|
-
.hack({
|
|
1093
|
-
'bar': (input, belt) => [input.struct('777', input.hack(belt))],
|
|
1094
|
-
});
|
|
1095
|
-
$mol_assert_equal(res.toString(), 'foo 777 xxx\n');
|
|
1096
|
-
},
|
|
1097
|
-
});
|
|
1098
|
-
})($ || ($ = {}));
|
|
1099
|
-
//mol/tree2/tree2.test.ts
|
|
1100
|
-
;
|
|
1101
|
-
"use strict";
|
|
1102
|
-
var $;
|
|
1103
|
-
(function ($) {
|
|
1104
|
-
$mol_test({
|
|
1105
|
-
'fromJSON'() {
|
|
1106
|
-
$mol_assert_equal($mol_tree2_from_json([]).toString(), '/\n');
|
|
1107
|
-
$mol_assert_equal($mol_tree2_from_json([false, true]).toString(), '/\n\tfalse\n\ttrue\n');
|
|
1108
|
-
$mol_assert_equal($mol_tree2_from_json([0, 1, 2.3]).toString(), '/\n\t0\n\t1\n\t2.3\n');
|
|
1109
|
-
$mol_assert_equal($mol_tree2_from_json(['', 'foo', 'bar\nbaz']).toString(), '/\n\t\\\n\t\\foo\n\t\\\n\t\t\\bar\n\t\t\\baz\n');
|
|
1110
|
-
$mol_assert_equal($mol_tree2_from_json({ 'foo': false, 'bar\nbaz': 'lol' }).toString(), '*\n\tfoo false\n\t\\\n\t\t\\bar\n\t\t\\baz\n\t\t\\lol\n');
|
|
1111
|
-
},
|
|
1112
|
-
});
|
|
1143
|
+
$.$mol_data_setup = $mol_data_setup;
|
|
1113
1144
|
})($ || ($ = {}));
|
|
1114
|
-
//mol/
|
|
1115
|
-
;
|
|
1116
|
-
"use strict";
|
|
1117
|
-
//mol/type/unary/unary.ts
|
|
1118
|
-
;
|
|
1119
|
-
"use strict";
|
|
1120
|
-
//mol/type/param/param.test.ts
|
|
1121
|
-
;
|
|
1122
|
-
"use strict";
|
|
1123
|
-
//mol/type/param/param.ts
|
|
1124
|
-
;
|
|
1125
|
-
"use strict";
|
|
1126
|
-
//mol/type/tail/tail.test.ts
|
|
1127
|
-
;
|
|
1128
|
-
"use strict";
|
|
1129
|
-
//mol/type/tail/tail.ts
|
|
1130
|
-
;
|
|
1131
|
-
"use strict";
|
|
1132
|
-
//mol/data/value/value.ts
|
|
1145
|
+
//mol/data/setup/setup.ts
|
|
1133
1146
|
;
|
|
1134
1147
|
"use strict";
|
|
1135
1148
|
var $;
|
|
@@ -1146,15 +1159,12 @@ var $;
|
|
|
1146
1159
|
"use strict";
|
|
1147
1160
|
var $;
|
|
1148
1161
|
(function ($) {
|
|
1149
|
-
function $
|
|
1150
|
-
return Object.
|
|
1151
|
-
config,
|
|
1152
|
-
Value: null
|
|
1153
|
-
});
|
|
1162
|
+
function $mol_func_is_class(func) {
|
|
1163
|
+
return Object.getOwnPropertyDescriptor(func, 'prototype')?.writable === false;
|
|
1154
1164
|
}
|
|
1155
|
-
$.$
|
|
1165
|
+
$.$mol_func_is_class = $mol_func_is_class;
|
|
1156
1166
|
})($ || ($ = {}));
|
|
1157
|
-
//mol/
|
|
1167
|
+
//mol/func/is/class/class.ts
|
|
1158
1168
|
;
|
|
1159
1169
|
"use strict";
|
|
1160
1170
|
var $;
|
|
@@ -1185,26 +1195,31 @@ var $;
|
|
|
1185
1195
|
//mol/func/is/class/class.test.ts
|
|
1186
1196
|
;
|
|
1187
1197
|
"use strict";
|
|
1188
|
-
|
|
1189
|
-
(function ($) {
|
|
1190
|
-
function $mol_func_is_class(func) {
|
|
1191
|
-
return Object.getOwnPropertyDescriptor(func, 'prototype')?.writable === false;
|
|
1192
|
-
}
|
|
1193
|
-
$.$mol_func_is_class = $mol_func_is_class;
|
|
1194
|
-
})($ || ($ = {}));
|
|
1195
|
-
//mol/func/is/class/class.ts
|
|
1198
|
+
//mol/type/result/result.ts
|
|
1196
1199
|
;
|
|
1197
1200
|
"use strict";
|
|
1198
1201
|
//mol/type/result/result.test.ts
|
|
1199
1202
|
;
|
|
1200
1203
|
"use strict";
|
|
1201
|
-
//mol/type/
|
|
1204
|
+
//mol/type/foot/foot.ts
|
|
1202
1205
|
;
|
|
1203
1206
|
"use strict";
|
|
1204
1207
|
//mol/type/foot/foot.test.ts
|
|
1205
1208
|
;
|
|
1206
1209
|
"use strict";
|
|
1207
|
-
|
|
1210
|
+
var $;
|
|
1211
|
+
(function ($) {
|
|
1212
|
+
function $mol_data_pipe(...funcs) {
|
|
1213
|
+
return $mol_data_setup(function (input) {
|
|
1214
|
+
let value = input;
|
|
1215
|
+
for (const func of funcs)
|
|
1216
|
+
value = $mol_func_is_class(func) ? new func(value) : func.call(this, value);
|
|
1217
|
+
return value;
|
|
1218
|
+
}, { funcs });
|
|
1219
|
+
}
|
|
1220
|
+
$.$mol_data_pipe = $mol_data_pipe;
|
|
1221
|
+
})($ || ($ = {}));
|
|
1222
|
+
//mol/data/pipe/pipe.ts
|
|
1208
1223
|
;
|
|
1209
1224
|
"use strict";
|
|
1210
1225
|
var $;
|
|
@@ -1240,21 +1255,6 @@ var $;
|
|
|
1240
1255
|
;
|
|
1241
1256
|
"use strict";
|
|
1242
1257
|
var $;
|
|
1243
|
-
(function ($) {
|
|
1244
|
-
function $mol_data_pipe(...funcs) {
|
|
1245
|
-
return $mol_data_setup(function (input) {
|
|
1246
|
-
let value = input;
|
|
1247
|
-
for (const func of funcs)
|
|
1248
|
-
value = $mol_func_is_class(func) ? new func(value) : func.call(this, value);
|
|
1249
|
-
return value;
|
|
1250
|
-
}, { funcs });
|
|
1251
|
-
}
|
|
1252
|
-
$.$mol_data_pipe = $mol_data_pipe;
|
|
1253
|
-
})($ || ($ = {}));
|
|
1254
|
-
//mol/data/pipe/pipe.ts
|
|
1255
|
-
;
|
|
1256
|
-
"use strict";
|
|
1257
|
-
var $;
|
|
1258
1258
|
(function ($) {
|
|
1259
1259
|
const convert = $mol_data_pipe($mol_tree2_from_string, $mol_tree2_js_to_text, $mol_tree2_text_to_string);
|
|
1260
1260
|
$mol_test({
|