mol_tree2 1.0.214 → 1.0.216
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.deps.json +1 -1
- package/node.js +13 -13
- package/node.js.map +1 -1
- package/node.mjs +13 -13
- package/node.mjs.map +1 -1
- package/node.test.js +460 -460
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.deps.json +1 -1
- package/web.js +13 -13
- package/web.js.map +1 -1
- package/web.mjs +13 -13
- package/web.mjs.map +1 -1
- package/web.test.js +388 -388
- package/web.test.js.map +1 -1
package/web.test.js
CHANGED
|
@@ -168,112 +168,16 @@ var $;
|
|
|
168
168
|
//mol/type/error/error.ts
|
|
169
169
|
;
|
|
170
170
|
"use strict";
|
|
171
|
-
//mol/type/assert/assert.test.ts
|
|
172
|
-
;
|
|
173
|
-
"use strict";
|
|
174
171
|
//mol/type/assert/assert.ts
|
|
175
172
|
;
|
|
176
173
|
"use strict";
|
|
177
|
-
//mol/type/
|
|
178
|
-
;
|
|
179
|
-
"use strict";
|
|
180
|
-
//mol/type/equals/equals.ts
|
|
181
|
-
;
|
|
182
|
-
"use strict";
|
|
183
|
-
//mol/type/partial/deep/deep.test.ts
|
|
174
|
+
//mol/type/assert/assert.test.ts
|
|
184
175
|
;
|
|
185
176
|
"use strict";
|
|
186
177
|
//mol/type/partial/deep/deep.ts
|
|
187
178
|
;
|
|
188
179
|
"use strict";
|
|
189
|
-
|
|
190
|
-
(function ($) {
|
|
191
|
-
$mol_test({
|
|
192
|
-
'Make empty div'() {
|
|
193
|
-
$mol_assert_equal(($mol_jsx("div", null)).outerHTML, '<div></div>');
|
|
194
|
-
},
|
|
195
|
-
'Define native field'() {
|
|
196
|
-
const dom = $mol_jsx("input", { value: '123' });
|
|
197
|
-
$mol_assert_equal(dom.outerHTML, '<input value="123">');
|
|
198
|
-
$mol_assert_equal(dom.value, '123');
|
|
199
|
-
},
|
|
200
|
-
'Define classes'() {
|
|
201
|
-
const dom = $mol_jsx("div", { class: 'foo bar' });
|
|
202
|
-
$mol_assert_equal(dom.outerHTML, '<div class="foo bar"></div>');
|
|
203
|
-
},
|
|
204
|
-
'Define styles'() {
|
|
205
|
-
const dom = $mol_jsx("div", { style: { color: 'red' } });
|
|
206
|
-
$mol_assert_equal(dom.outerHTML, '<div style="color: red;"></div>');
|
|
207
|
-
},
|
|
208
|
-
'Define dataset'() {
|
|
209
|
-
const dom = $mol_jsx("div", { dataset: { foo: 'bar' } });
|
|
210
|
-
$mol_assert_equal(dom.outerHTML, '<div data-foo="bar"></div>');
|
|
211
|
-
},
|
|
212
|
-
'Define attributes'() {
|
|
213
|
-
const dom = $mol_jsx("div", { lang: "ru", hidden: true });
|
|
214
|
-
$mol_assert_equal(dom.outerHTML, '<div lang="ru" hidden=""></div>');
|
|
215
|
-
},
|
|
216
|
-
'Define child nodes'() {
|
|
217
|
-
const dom = $mol_jsx("div", null,
|
|
218
|
-
"hello",
|
|
219
|
-
$mol_jsx("strong", null, "world"),
|
|
220
|
-
"!");
|
|
221
|
-
$mol_assert_equal(dom.outerHTML, '<div>hello<strong>world</strong>!</div>');
|
|
222
|
-
},
|
|
223
|
-
'Function as component'() {
|
|
224
|
-
const Button = (props, target) => {
|
|
225
|
-
return $mol_jsx("button", { title: props.hint }, target());
|
|
226
|
-
};
|
|
227
|
-
const dom = $mol_jsx(Button, { id: "foo", hint: "click me" }, () => 'hey!');
|
|
228
|
-
$mol_assert_equal(dom.outerHTML, '<button id="foo" title="click me" class="Button">hey!</button>');
|
|
229
|
-
},
|
|
230
|
-
'Nested guid generation'() {
|
|
231
|
-
const Foo = () => {
|
|
232
|
-
return $mol_jsx("div", null,
|
|
233
|
-
$mol_jsx(Bar, { id: "bar" },
|
|
234
|
-
$mol_jsx("img", { id: "icon" })));
|
|
235
|
-
};
|
|
236
|
-
const Bar = (props, icon) => {
|
|
237
|
-
return $mol_jsx("span", null,
|
|
238
|
-
icon,
|
|
239
|
-
$mol_jsx("i", { id: "label" }));
|
|
240
|
-
};
|
|
241
|
-
const dom = $mol_jsx(Foo, { id: "foo" });
|
|
242
|
-
$mol_assert_equal(dom.outerHTML, '<div id="foo" class="Foo"><span id="foo/bar" class="Foo_bar Bar"><img id="foo/icon" class="Foo_icon"><i id="foo/bar/label" class="Foo_bar_label Bar_label"></i></span></div>');
|
|
243
|
-
},
|
|
244
|
-
'Fail on non unique ids'() {
|
|
245
|
-
const App = () => {
|
|
246
|
-
return $mol_jsx("div", null,
|
|
247
|
-
$mol_jsx("span", { id: "bar" }),
|
|
248
|
-
$mol_jsx("span", { id: "bar" }));
|
|
249
|
-
};
|
|
250
|
-
$mol_assert_fail(() => $mol_jsx(App, { id: "foo" }), 'JSX already has tag with id "foo/bar"');
|
|
251
|
-
},
|
|
252
|
-
'Owner based guid generationn'() {
|
|
253
|
-
const Foo = () => {
|
|
254
|
-
return $mol_jsx("div", null,
|
|
255
|
-
$mol_jsx(Bar, { id: "middle", icon: () => $mol_jsx("img", { id: "icon" }) }));
|
|
256
|
-
};
|
|
257
|
-
const Bar = (props) => {
|
|
258
|
-
return $mol_jsx("span", null, props.icon());
|
|
259
|
-
};
|
|
260
|
-
const dom = $mol_jsx(Foo, { id: "app" });
|
|
261
|
-
$mol_assert_equal(dom.outerHTML, '<div id="app" class="Foo"><span id="app/middle" class="Foo_middle Bar"><img id="app/icon" class="Foo_icon"></span></div>');
|
|
262
|
-
},
|
|
263
|
-
'Fail on same ids from different caller'() {
|
|
264
|
-
const Foo = () => {
|
|
265
|
-
return $mol_jsx("div", null,
|
|
266
|
-
$mol_jsx("img", { id: "icon" }),
|
|
267
|
-
$mol_jsx(Bar, { id: "bar", icon: () => $mol_jsx("img", { id: "icon" }) }));
|
|
268
|
-
};
|
|
269
|
-
const Bar = (props) => {
|
|
270
|
-
return $mol_jsx("span", null, props.icon());
|
|
271
|
-
};
|
|
272
|
-
$mol_assert_fail(() => $mol_jsx(Foo, { id: "foo" }), 'JSX already has tag with id "foo/icon"');
|
|
273
|
-
},
|
|
274
|
-
});
|
|
275
|
-
})($ || ($ = {}));
|
|
276
|
-
//mol/jsx/jsx.test.tsx
|
|
180
|
+
//mol/type/partial/deep/deep.test.ts
|
|
277
181
|
;
|
|
278
182
|
"use strict";
|
|
279
183
|
var $;
|
|
@@ -400,97 +304,91 @@ var $;
|
|
|
400
304
|
var $;
|
|
401
305
|
(function ($) {
|
|
402
306
|
$mol_test({
|
|
403
|
-
'
|
|
404
|
-
$
|
|
405
|
-
$mol_assert_ok($mol_compare_deep(undefined, undefined));
|
|
406
|
-
$mol_assert_not($mol_compare_deep(undefined, null));
|
|
407
|
-
$mol_assert_not($mol_compare_deep({}, null));
|
|
408
|
-
},
|
|
409
|
-
'number'() {
|
|
410
|
-
$mol_assert_ok($mol_compare_deep(1, 1));
|
|
411
|
-
$mol_assert_ok($mol_compare_deep(Number.NaN, Number.NaN));
|
|
412
|
-
$mol_assert_not($mol_compare_deep(1, 2));
|
|
413
|
-
$mol_assert_ok($mol_compare_deep(Object(1), Object(1)));
|
|
414
|
-
$mol_assert_not($mol_compare_deep(Object(1), Object(2)));
|
|
307
|
+
'Make empty div'() {
|
|
308
|
+
$mol_assert_equal(($mol_jsx("div", null)).outerHTML, '<div></div>');
|
|
415
309
|
},
|
|
416
|
-
'
|
|
417
|
-
$
|
|
418
|
-
$
|
|
419
|
-
$
|
|
420
|
-
$mol_assert_not($mol_compare_deep({}, { a: undefined }));
|
|
421
|
-
$mol_assert_ok($mol_compare_deep({ a: 1, b: 2 }, { b: 2, a: 1 }));
|
|
422
|
-
$mol_assert_ok($mol_compare_deep({ a: { b: 1 } }, { a: { b: 1 } }));
|
|
310
|
+
'Define native field'() {
|
|
311
|
+
const dom = $mol_jsx("input", { value: '123' });
|
|
312
|
+
$mol_assert_equal(dom.outerHTML, '<input value="123">');
|
|
313
|
+
$mol_assert_equal(dom.value, '123');
|
|
423
314
|
},
|
|
424
|
-
'
|
|
425
|
-
$
|
|
426
|
-
$
|
|
427
|
-
$mol_assert_not($mol_compare_deep([1, 2], [1, 3]));
|
|
428
|
-
$mol_assert_not($mol_compare_deep([1, 2,], [1, 3, undefined]));
|
|
315
|
+
'Define classes'() {
|
|
316
|
+
const dom = $mol_jsx("div", { class: 'foo bar' });
|
|
317
|
+
$mol_assert_equal(dom.outerHTML, '<div class="foo bar"></div>');
|
|
429
318
|
},
|
|
430
|
-
'
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
$mol_assert_not($mol_compare_deep(new Thing, new Thing));
|
|
434
|
-
$mol_assert_not($mol_compare_deep(() => 1, () => 1));
|
|
435
|
-
$mol_assert_not($mol_compare_deep(new RangeError('Test error'), new RangeError('Test error')));
|
|
319
|
+
'Define styles'() {
|
|
320
|
+
const dom = $mol_jsx("div", { style: { color: 'red' } });
|
|
321
|
+
$mol_assert_equal(dom.outerHTML, '<div style="color: red;"></div>');
|
|
436
322
|
},
|
|
437
|
-
'
|
|
438
|
-
const
|
|
439
|
-
|
|
440
|
-
const b = { foo: {} };
|
|
441
|
-
b['self'] = b;
|
|
442
|
-
$mol_assert_ok($mol_compare_deep(a, b));
|
|
323
|
+
'Define dataset'() {
|
|
324
|
+
const dom = $mol_jsx("div", { dataset: { foo: 'bar' } });
|
|
325
|
+
$mol_assert_equal(dom.outerHTML, '<div data-foo="bar"></div>');
|
|
443
326
|
},
|
|
444
|
-
'
|
|
445
|
-
$
|
|
446
|
-
$
|
|
327
|
+
'Define attributes'() {
|
|
328
|
+
const dom = $mol_jsx("div", { lang: "ru", hidden: true });
|
|
329
|
+
$mol_assert_equal(dom.outerHTML, '<div lang="ru" hidden=""></div>');
|
|
447
330
|
},
|
|
448
|
-
'
|
|
449
|
-
$
|
|
450
|
-
|
|
451
|
-
|
|
331
|
+
'Define child nodes'() {
|
|
332
|
+
const dom = $mol_jsx("div", null,
|
|
333
|
+
"hello",
|
|
334
|
+
$mol_jsx("strong", null, "world"),
|
|
335
|
+
"!");
|
|
336
|
+
$mol_assert_equal(dom.outerHTML, '<div>hello<strong>world</strong>!</div>');
|
|
452
337
|
},
|
|
453
|
-
'
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
$
|
|
338
|
+
'Function as component'() {
|
|
339
|
+
const Button = (props, target) => {
|
|
340
|
+
return $mol_jsx("button", { title: props.hint }, target());
|
|
341
|
+
};
|
|
342
|
+
const dom = $mol_jsx(Button, { id: "foo", hint: "click me" }, () => 'hey!');
|
|
343
|
+
$mol_assert_equal(dom.outerHTML, '<button id="foo" title="click me" class="Button">hey!</button>');
|
|
458
344
|
},
|
|
459
|
-
'
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
345
|
+
'Nested guid generation'() {
|
|
346
|
+
const Foo = () => {
|
|
347
|
+
return $mol_jsx("div", null,
|
|
348
|
+
$mol_jsx(Bar, { id: "bar" },
|
|
349
|
+
$mol_jsx("img", { id: "icon" })));
|
|
350
|
+
};
|
|
351
|
+
const Bar = (props, icon) => {
|
|
352
|
+
return $mol_jsx("span", null,
|
|
353
|
+
icon,
|
|
354
|
+
$mol_jsx("i", { id: "label" }));
|
|
355
|
+
};
|
|
356
|
+
const dom = $mol_jsx(Foo, { id: "foo" });
|
|
357
|
+
$mol_assert_equal(dom.outerHTML, '<div id="foo" class="Foo"><span id="foo/bar" class="Foo_bar Bar"><img id="foo/icon" class="Foo_icon"><i id="foo/bar/label" class="Foo_bar_label Bar_label"></i></span></div>');
|
|
465
358
|
},
|
|
466
|
-
'
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
359
|
+
'Fail on non unique ids'() {
|
|
360
|
+
const App = () => {
|
|
361
|
+
return $mol_jsx("div", null,
|
|
362
|
+
$mol_jsx("span", { id: "bar" }),
|
|
363
|
+
$mol_jsx("span", { id: "bar" }));
|
|
364
|
+
};
|
|
365
|
+
$mol_assert_fail(() => $mol_jsx(App, { id: "foo" }), 'JSX already has tag with id "foo/bar"');
|
|
470
366
|
},
|
|
471
|
-
'
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
367
|
+
'Owner based guid generationn'() {
|
|
368
|
+
const Foo = () => {
|
|
369
|
+
return $mol_jsx("div", null,
|
|
370
|
+
$mol_jsx(Bar, { id: "middle", icon: () => $mol_jsx("img", { id: "icon" }) }));
|
|
371
|
+
};
|
|
372
|
+
const Bar = (props) => {
|
|
373
|
+
return $mol_jsx("span", null, props.icon());
|
|
374
|
+
};
|
|
375
|
+
const dom = $mol_jsx(Foo, { id: "app" });
|
|
376
|
+
$mol_assert_equal(dom.outerHTML, '<div id="app" class="Foo"><span id="app/middle" class="Foo_middle Bar"><img id="app/icon" class="Foo_icon"></span></div>');
|
|
475
377
|
},
|
|
476
|
-
'
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
$mol_assert_ok($mol_compare_deep(new User('Jin'), new User('Jin')));
|
|
489
|
-
$mol_assert_not($mol_compare_deep(new User('Jin'), new User('John')));
|
|
378
|
+
'Fail on same ids from different caller'() {
|
|
379
|
+
const Foo = () => {
|
|
380
|
+
return $mol_jsx("div", null,
|
|
381
|
+
$mol_jsx("img", { id: "icon" }),
|
|
382
|
+
$mol_jsx(Bar, { id: "bar", icon: () => $mol_jsx("img", { id: "icon" }) }));
|
|
383
|
+
};
|
|
384
|
+
const Bar = (props) => {
|
|
385
|
+
return $mol_jsx("span", null, props.icon());
|
|
386
|
+
};
|
|
387
|
+
$mol_assert_fail(() => $mol_jsx(Foo, { id: "foo" }), 'JSX already has tag with id "foo/icon"');
|
|
490
388
|
},
|
|
491
389
|
});
|
|
492
390
|
})($ || ($ = {}));
|
|
493
|
-
//mol/
|
|
391
|
+
//mol/jsx/jsx.test.tsx
|
|
494
392
|
;
|
|
495
393
|
"use strict";
|
|
496
394
|
var $;
|
|
@@ -619,46 +517,110 @@ var $;
|
|
|
619
517
|
;
|
|
620
518
|
"use strict";
|
|
621
519
|
var $;
|
|
622
|
-
(function ($) {
|
|
623
|
-
function $mol_dom_serialize(node) {
|
|
624
|
-
const serializer = new $mol_dom_context.XMLSerializer;
|
|
625
|
-
return serializer.serializeToString(node);
|
|
626
|
-
}
|
|
627
|
-
$.$mol_dom_serialize = $mol_dom_serialize;
|
|
628
|
-
})($ || ($ = {}));
|
|
629
|
-
//mol/dom/serialize/serialize.ts
|
|
630
|
-
;
|
|
631
|
-
"use strict";
|
|
632
|
-
var $;
|
|
633
520
|
(function ($) {
|
|
634
521
|
$mol_test({
|
|
635
|
-
'
|
|
636
|
-
$
|
|
522
|
+
'nulls & undefineds'() {
|
|
523
|
+
$mol_assert_ok($mol_compare_deep(null, null));
|
|
524
|
+
$mol_assert_ok($mol_compare_deep(undefined, undefined));
|
|
525
|
+
$mol_assert_not($mol_compare_deep(undefined, null));
|
|
526
|
+
$mol_assert_not($mol_compare_deep({}, null));
|
|
637
527
|
},
|
|
638
|
-
'
|
|
639
|
-
$mol_assert_ok(1);
|
|
528
|
+
'number'() {
|
|
529
|
+
$mol_assert_ok($mol_compare_deep(1, 1));
|
|
530
|
+
$mol_assert_ok($mol_compare_deep(Number.NaN, Number.NaN));
|
|
531
|
+
$mol_assert_not($mol_compare_deep(1, 2));
|
|
532
|
+
$mol_assert_ok($mol_compare_deep(Object(1), Object(1)));
|
|
533
|
+
$mol_assert_not($mol_compare_deep(Object(1), Object(2)));
|
|
640
534
|
},
|
|
641
|
-
'
|
|
642
|
-
$
|
|
535
|
+
'POJO'() {
|
|
536
|
+
$mol_assert_ok($mol_compare_deep({}, {}));
|
|
537
|
+
$mol_assert_not($mol_compare_deep({ a: 1 }, { b: 2 }));
|
|
538
|
+
$mol_assert_not($mol_compare_deep({ a: 1 }, { a: 2 }));
|
|
539
|
+
$mol_assert_not($mol_compare_deep({}, { a: undefined }));
|
|
540
|
+
$mol_assert_ok($mol_compare_deep({ a: 1, b: 2 }, { b: 2, a: 1 }));
|
|
541
|
+
$mol_assert_ok($mol_compare_deep({ a: { b: 1 } }, { a: { b: 1 } }));
|
|
643
542
|
},
|
|
644
|
-
'
|
|
645
|
-
$
|
|
543
|
+
'Array'() {
|
|
544
|
+
$mol_assert_ok($mol_compare_deep([], []));
|
|
545
|
+
$mol_assert_ok($mol_compare_deep([1, [2]], [1, [2]]));
|
|
546
|
+
$mol_assert_not($mol_compare_deep([1, 2], [1, 3]));
|
|
547
|
+
$mol_assert_not($mol_compare_deep([1, 2,], [1, 3, undefined]));
|
|
646
548
|
},
|
|
647
|
-
'
|
|
648
|
-
|
|
549
|
+
'Non POJO are different'() {
|
|
550
|
+
class Thing extends Object {
|
|
551
|
+
}
|
|
552
|
+
$mol_assert_not($mol_compare_deep(new Thing, new Thing));
|
|
553
|
+
$mol_assert_not($mol_compare_deep(() => 1, () => 1));
|
|
554
|
+
$mol_assert_not($mol_compare_deep(new RangeError('Test error'), new RangeError('Test error')));
|
|
649
555
|
},
|
|
650
|
-
'
|
|
651
|
-
|
|
556
|
+
'same POJOs with cyclic reference'() {
|
|
557
|
+
const a = { foo: {} };
|
|
558
|
+
a['self'] = a;
|
|
559
|
+
const b = { foo: {} };
|
|
560
|
+
b['self'] = b;
|
|
561
|
+
$mol_assert_ok($mol_compare_deep(a, b));
|
|
652
562
|
},
|
|
653
|
-
'
|
|
654
|
-
$
|
|
563
|
+
'Date'() {
|
|
564
|
+
$mol_assert_ok($mol_compare_deep(new Date(12345), new Date(12345)));
|
|
565
|
+
$mol_assert_not($mol_compare_deep(new Date(12345), new Date(12346)));
|
|
655
566
|
},
|
|
656
|
-
'
|
|
657
|
-
$
|
|
567
|
+
'RegExp'() {
|
|
568
|
+
$mol_assert_ok($mol_compare_deep(/\x22/mig, /\x22/mig));
|
|
569
|
+
$mol_assert_not($mol_compare_deep(/\x22/mig, /\x21/mig));
|
|
570
|
+
$mol_assert_not($mol_compare_deep(/\x22/mig, /\x22/mg));
|
|
571
|
+
},
|
|
572
|
+
'Error'() {
|
|
573
|
+
$mol_assert_not($mol_compare_deep(new Error('xxx'), new Error('xxx')));
|
|
574
|
+
const fail = (message) => new Error(message);
|
|
575
|
+
$mol_assert_ok($mol_compare_deep(...['xxx', 'xxx'].map(msg => new Error(msg))));
|
|
576
|
+
$mol_assert_not($mol_compare_deep(...['xxx', 'yyy'].map(msg => new Error(msg))));
|
|
577
|
+
},
|
|
578
|
+
'Map'() {
|
|
579
|
+
$mol_assert_ok($mol_compare_deep(new Map, new Map));
|
|
580
|
+
$mol_assert_ok($mol_compare_deep(new Map([[1, [2]]]), new Map([[1, [2]]])));
|
|
581
|
+
$mol_assert_ok($mol_compare_deep(new Map([[[1], 2]]), new Map([[[1], 2]])));
|
|
582
|
+
$mol_assert_not($mol_compare_deep(new Map([[1, 2]]), new Map([[1, 3]])));
|
|
583
|
+
$mol_assert_not($mol_compare_deep(new Map([[[1], 2]]), new Map([[[3], 2]])));
|
|
584
|
+
},
|
|
585
|
+
'Set'() {
|
|
586
|
+
$mol_assert_ok($mol_compare_deep(new Set, new Set));
|
|
587
|
+
$mol_assert_ok($mol_compare_deep(new Set([1, [2]]), new Set([1, [2]])));
|
|
588
|
+
$mol_assert_not($mol_compare_deep(new Set([1]), new Set([2])));
|
|
589
|
+
},
|
|
590
|
+
'Uint8Array'() {
|
|
591
|
+
$mol_assert_ok($mol_compare_deep(new Uint8Array, new Uint8Array));
|
|
592
|
+
$mol_assert_ok($mol_compare_deep(new Uint8Array([0]), new Uint8Array([0])));
|
|
593
|
+
$mol_assert_not($mol_compare_deep(new Uint8Array([0]), new Uint8Array([1])));
|
|
594
|
+
},
|
|
595
|
+
'Custom comparator'() {
|
|
596
|
+
class User {
|
|
597
|
+
name;
|
|
598
|
+
rand;
|
|
599
|
+
constructor(name, rand = Math.random()) {
|
|
600
|
+
this.name = name;
|
|
601
|
+
this.rand = rand;
|
|
602
|
+
}
|
|
603
|
+
[Symbol.toPrimitive](mode) {
|
|
604
|
+
return this.name;
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
$mol_assert_ok($mol_compare_deep(new User('Jin'), new User('Jin')));
|
|
608
|
+
$mol_assert_not($mol_compare_deep(new User('Jin'), new User('John')));
|
|
658
609
|
},
|
|
659
610
|
});
|
|
660
611
|
})($ || ($ = {}));
|
|
661
|
-
//mol/
|
|
612
|
+
//mol/compare/deep/deep.test.tsx
|
|
613
|
+
;
|
|
614
|
+
"use strict";
|
|
615
|
+
var $;
|
|
616
|
+
(function ($) {
|
|
617
|
+
function $mol_dom_serialize(node) {
|
|
618
|
+
const serializer = new $mol_dom_context.XMLSerializer;
|
|
619
|
+
return serializer.serializeToString(node);
|
|
620
|
+
}
|
|
621
|
+
$.$mol_dom_serialize = $mol_dom_serialize;
|
|
622
|
+
})($ || ($ = {}));
|
|
623
|
+
//mol/dom/serialize/serialize.ts
|
|
662
624
|
;
|
|
663
625
|
"use strict";
|
|
664
626
|
var $;
|
|
@@ -717,42 +679,199 @@ var $;
|
|
|
717
679
|
for (let j = 0; j < args.length; ++j) {
|
|
718
680
|
if (i === j)
|
|
719
681
|
continue;
|
|
720
|
-
if (args[i] === args[j] || (Number.isNaN(args[i]) && Number.isNaN(args[j]))) {
|
|
721
|
-
$mol_fail(new Error(`args[${i}] = args[${j}] = ${args[i]}`));
|
|
722
|
-
}
|
|
723
|
-
}
|
|
724
|
-
}
|
|
725
|
-
}
|
|
726
|
-
$.$mol_assert_unique = $mol_assert_unique;
|
|
727
|
-
function $mol_assert_like(head, ...tail) {
|
|
728
|
-
for (let [index, value] of Object.entries(tail)) {
|
|
729
|
-
if (!$mol_compare_deep(value, head)) {
|
|
730
|
-
const print = (val) => {
|
|
731
|
-
if (!val)
|
|
732
|
-
return val;
|
|
733
|
-
if (typeof val !== 'object')
|
|
734
|
-
return val;
|
|
735
|
-
if ('outerHTML' in val)
|
|
736
|
-
return val.outerHTML;
|
|
737
|
-
try {
|
|
738
|
-
return JSON.stringify(val);
|
|
739
|
-
}
|
|
740
|
-
catch (error) {
|
|
741
|
-
console.error(error);
|
|
742
|
-
return val;
|
|
743
|
-
}
|
|
744
|
-
};
|
|
745
|
-
return $mol_fail(new Error(`Not like (1:${+index + 2})\n${print(head)}\n---\n${print(value)}`));
|
|
682
|
+
if (args[i] === args[j] || (Number.isNaN(args[i]) && Number.isNaN(args[j]))) {
|
|
683
|
+
$mol_fail(new Error(`args[${i}] = args[${j}] = ${args[i]}`));
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
$.$mol_assert_unique = $mol_assert_unique;
|
|
689
|
+
function $mol_assert_like(head, ...tail) {
|
|
690
|
+
for (let [index, value] of Object.entries(tail)) {
|
|
691
|
+
if (!$mol_compare_deep(value, head)) {
|
|
692
|
+
const print = (val) => {
|
|
693
|
+
if (!val)
|
|
694
|
+
return val;
|
|
695
|
+
if (typeof val !== 'object')
|
|
696
|
+
return val;
|
|
697
|
+
if ('outerHTML' in val)
|
|
698
|
+
return val.outerHTML;
|
|
699
|
+
try {
|
|
700
|
+
return JSON.stringify(val);
|
|
701
|
+
}
|
|
702
|
+
catch (error) {
|
|
703
|
+
console.error(error);
|
|
704
|
+
return val;
|
|
705
|
+
}
|
|
706
|
+
};
|
|
707
|
+
return $mol_fail(new Error(`Not like (1:${+index + 2})\n${print(head)}\n---\n${print(value)}`));
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
$.$mol_assert_like = $mol_assert_like;
|
|
712
|
+
function $mol_assert_dom(left, right) {
|
|
713
|
+
$mol_assert_equal($mol_dom_serialize(left), $mol_dom_serialize(right));
|
|
714
|
+
}
|
|
715
|
+
$.$mol_assert_dom = $mol_assert_dom;
|
|
716
|
+
})($ || ($ = {}));
|
|
717
|
+
//mol/assert/assert.ts
|
|
718
|
+
;
|
|
719
|
+
"use strict";
|
|
720
|
+
var $;
|
|
721
|
+
(function ($) {
|
|
722
|
+
$mol_test({
|
|
723
|
+
'must be false'() {
|
|
724
|
+
$mol_assert_not(0);
|
|
725
|
+
},
|
|
726
|
+
'must be true'() {
|
|
727
|
+
$mol_assert_ok(1);
|
|
728
|
+
},
|
|
729
|
+
'two must be equal'() {
|
|
730
|
+
$mol_assert_equal(2, 2);
|
|
731
|
+
},
|
|
732
|
+
'three must be equal'() {
|
|
733
|
+
$mol_assert_equal(2, 2, 2);
|
|
734
|
+
},
|
|
735
|
+
'two must be unique'() {
|
|
736
|
+
$mol_assert_unique([3], [3]);
|
|
737
|
+
},
|
|
738
|
+
'three must be unique'() {
|
|
739
|
+
$mol_assert_unique([3], [3], [3]);
|
|
740
|
+
},
|
|
741
|
+
'two must be alike'() {
|
|
742
|
+
$mol_assert_like([3], [3]);
|
|
743
|
+
},
|
|
744
|
+
'three must be alike'() {
|
|
745
|
+
$mol_assert_like([3], [3], [3]);
|
|
746
|
+
},
|
|
747
|
+
});
|
|
748
|
+
})($ || ($ = {}));
|
|
749
|
+
//mol/assert/assert.test.ts
|
|
750
|
+
;
|
|
751
|
+
"use strict";
|
|
752
|
+
var $;
|
|
753
|
+
(function ($) {
|
|
754
|
+
function $mol_log3_area_lazy(event) {
|
|
755
|
+
const self = this;
|
|
756
|
+
const stack = self.$mol_log3_stack;
|
|
757
|
+
const deep = stack.length;
|
|
758
|
+
let logged = false;
|
|
759
|
+
stack.push(() => {
|
|
760
|
+
logged = true;
|
|
761
|
+
self.$mol_log3_area.call(self, event);
|
|
762
|
+
});
|
|
763
|
+
return () => {
|
|
764
|
+
if (logged)
|
|
765
|
+
self.console.groupEnd();
|
|
766
|
+
if (stack.length > deep)
|
|
767
|
+
stack.length = deep;
|
|
768
|
+
};
|
|
769
|
+
}
|
|
770
|
+
$.$mol_log3_area_lazy = $mol_log3_area_lazy;
|
|
771
|
+
$.$mol_log3_stack = [];
|
|
772
|
+
})($ || ($ = {}));
|
|
773
|
+
//mol/log3/log3.ts
|
|
774
|
+
;
|
|
775
|
+
"use strict";
|
|
776
|
+
//mol/type/equals/equals.ts
|
|
777
|
+
;
|
|
778
|
+
"use strict";
|
|
779
|
+
//mol/type/equals/equals.test.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 ($) {
|
|
790
|
+
function $mol_log3_web_make(level, color) {
|
|
791
|
+
return function $mol_log3_logger(event) {
|
|
792
|
+
const pending = this.$mol_log3_stack.pop();
|
|
793
|
+
if (pending)
|
|
794
|
+
pending();
|
|
795
|
+
let tpl = '%c';
|
|
796
|
+
const chunks = Object.values(event);
|
|
797
|
+
for (let i = 0; i < chunks.length; ++i) {
|
|
798
|
+
tpl += (typeof chunks[i] === 'string') ? ' ⦙ %s' : ' ⦙ %o';
|
|
799
|
+
}
|
|
800
|
+
const style = `color:${color};font-weight:bolder`;
|
|
801
|
+
this.console[level](tpl, style, ...chunks);
|
|
802
|
+
const self = this;
|
|
803
|
+
return () => self.console.groupEnd();
|
|
804
|
+
};
|
|
805
|
+
}
|
|
806
|
+
$.$mol_log3_web_make = $mol_log3_web_make;
|
|
807
|
+
$.$mol_log3_come = $mol_log3_web_make('info', 'royalblue');
|
|
808
|
+
$.$mol_log3_done = $mol_log3_web_make('info', 'forestgreen');
|
|
809
|
+
$.$mol_log3_fail = $mol_log3_web_make('error', 'orangered');
|
|
810
|
+
$.$mol_log3_warn = $mol_log3_web_make('warn', 'goldenrod');
|
|
811
|
+
$.$mol_log3_rise = $mol_log3_web_make('log', 'magenta');
|
|
812
|
+
$.$mol_log3_area = $mol_log3_web_make('group', 'cyan');
|
|
813
|
+
})($ || ($ = {}));
|
|
814
|
+
//mol/log3/log3.web.ts
|
|
815
|
+
;
|
|
816
|
+
"use strict";
|
|
817
|
+
var $;
|
|
818
|
+
(function ($_1) {
|
|
819
|
+
$mol_test_mocks.push($ => {
|
|
820
|
+
$.$mol_log3_come = () => { };
|
|
821
|
+
$.$mol_log3_done = () => { };
|
|
822
|
+
$.$mol_log3_fail = () => { };
|
|
823
|
+
$.$mol_log3_warn = () => { };
|
|
824
|
+
$.$mol_log3_rise = () => { };
|
|
825
|
+
$.$mol_log3_area = () => () => { };
|
|
826
|
+
});
|
|
827
|
+
})($ || ($ = {}));
|
|
828
|
+
//mol/log3/log3.test.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;
|
|
746
847
|
}
|
|
848
|
+
catch { }
|
|
747
849
|
}
|
|
850
|
+
named.add(func);
|
|
851
|
+
return name;
|
|
748
852
|
}
|
|
749
|
-
$.$
|
|
750
|
-
function $
|
|
751
|
-
|
|
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;
|
|
752
857
|
}
|
|
753
|
-
$.$
|
|
858
|
+
$.$mol_func_name_from = $mol_func_name_from;
|
|
754
859
|
})($ || ($ = {}));
|
|
755
|
-
//mol/
|
|
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
|
|
756
875
|
;
|
|
757
876
|
"use strict";
|
|
758
877
|
var $;
|
|
@@ -938,125 +1057,6 @@ var $;
|
|
|
938
1057
|
;
|
|
939
1058
|
"use strict";
|
|
940
1059
|
var $;
|
|
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
|
|
962
|
-
;
|
|
963
|
-
"use strict";
|
|
964
|
-
//mol/type/keys/extract/extract.test.ts
|
|
965
|
-
;
|
|
966
|
-
"use strict";
|
|
967
|
-
//mol/type/keys/extract/extract.ts
|
|
968
|
-
;
|
|
969
|
-
"use strict";
|
|
970
|
-
var $;
|
|
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
|
|
982
|
-
;
|
|
983
|
-
"use strict";
|
|
984
|
-
var $;
|
|
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
|
|
1011
|
-
;
|
|
1012
|
-
"use strict";
|
|
1013
|
-
var $;
|
|
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
|
|
1025
|
-
;
|
|
1026
|
-
"use strict";
|
|
1027
|
-
var $;
|
|
1028
|
-
(function ($) {
|
|
1029
|
-
const named = new WeakSet();
|
|
1030
|
-
function $mol_func_name(func) {
|
|
1031
|
-
let name = func.name;
|
|
1032
|
-
if (name?.length > 1)
|
|
1033
|
-
return name;
|
|
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;
|
|
1053
|
-
}
|
|
1054
|
-
$.$mol_func_name_from = $mol_func_name_from;
|
|
1055
|
-
})($ || ($ = {}));
|
|
1056
|
-
//mol/func/name/name.ts
|
|
1057
|
-
;
|
|
1058
|
-
"use strict";
|
|
1059
|
-
var $;
|
|
1060
1060
|
(function ($_1) {
|
|
1061
1061
|
$mol_test({
|
|
1062
1062
|
'inserting'($) {
|
|
@@ -1117,19 +1117,32 @@ var $;
|
|
|
1117
1117
|
//mol/type/unary/unary.ts
|
|
1118
1118
|
;
|
|
1119
1119
|
"use strict";
|
|
1120
|
+
//mol/type/param/param.ts
|
|
1121
|
+
;
|
|
1122
|
+
"use strict";
|
|
1120
1123
|
//mol/type/param/param.test.ts
|
|
1121
1124
|
;
|
|
1122
1125
|
"use strict";
|
|
1123
|
-
//mol/type/
|
|
1126
|
+
//mol/type/tail/tail.ts
|
|
1124
1127
|
;
|
|
1125
1128
|
"use strict";
|
|
1126
1129
|
//mol/type/tail/tail.test.ts
|
|
1127
1130
|
;
|
|
1128
1131
|
"use strict";
|
|
1129
|
-
//mol/
|
|
1132
|
+
//mol/data/value/value.ts
|
|
1130
1133
|
;
|
|
1131
1134
|
"use strict";
|
|
1132
|
-
|
|
1135
|
+
var $;
|
|
1136
|
+
(function ($) {
|
|
1137
|
+
function $mol_data_setup(value, config) {
|
|
1138
|
+
return Object.assign(value, {
|
|
1139
|
+
config,
|
|
1140
|
+
Value: null
|
|
1141
|
+
});
|
|
1142
|
+
}
|
|
1143
|
+
$.$mol_data_setup = $mol_data_setup;
|
|
1144
|
+
})($ || ($ = {}));
|
|
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({
|