mol_crypto_lib 0.0.633 → 0.0.635

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 CHANGED
@@ -1,4 +1,12 @@
1
1
  "use strict";
2
+ "use strict";
3
+ Error.stackTraceLimit = 50;
4
+ var $;
5
+ (function ($) {
6
+ })($ || ($ = {}));
7
+ module.exports = $;
8
+ //mam.ts
9
+ ;
2
10
  "use strict"
3
11
 
4
12
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
@@ -11,14 +19,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
11
19
  var $ = ( typeof module === 'object' ) ? ( module['export'+'s'] = globalThis ) : globalThis
12
20
  $.$$ = $
13
21
 
14
- ;
15
- "use strict";
16
- Error.stackTraceLimit = 50;
17
- var $;
18
- (function ($) {
19
- })($ || ($ = {}));
20
- module.exports = $;
21
- //mam.ts
22
22
  ;
23
23
  "use strict";
24
24
  //node/node.ts
@@ -973,16 +973,6 @@ var $;
973
973
  ;
974
974
  "use strict";
975
975
  var $;
976
- (function ($) {
977
- function $mol_test_complete() {
978
- process.exit(0);
979
- }
980
- $.$mol_test_complete = $mol_test_complete;
981
- })($ || ($ = {}));
982
- //mol/test/test.node.test.ts
983
- ;
984
- "use strict";
985
- var $;
986
976
  (function ($_1) {
987
977
  function $mol_test(set) {
988
978
  for (let name in set) {
@@ -1071,8 +1061,12 @@ var $;
1071
1061
  "use strict";
1072
1062
  var $;
1073
1063
  (function ($) {
1064
+ function $mol_test_complete() {
1065
+ process.exit(0);
1066
+ }
1067
+ $.$mol_test_complete = $mol_test_complete;
1074
1068
  })($ || ($ = {}));
1075
- //mol/dom/context/context.ts
1069
+ //mol/test/test.node.test.ts
1076
1070
  ;
1077
1071
  "use strict";
1078
1072
  var $;
@@ -1089,6 +1083,30 @@ var $;
1089
1083
  //mol/log3/log3.test.ts
1090
1084
  ;
1091
1085
  "use strict";
1086
+ //mol/type/error/error.ts
1087
+ ;
1088
+ "use strict";
1089
+ //mol/type/assert/assert.ts
1090
+ ;
1091
+ "use strict";
1092
+ //mol/type/assert/assert.test.ts
1093
+ ;
1094
+ "use strict";
1095
+ //mol/type/equals/equals.ts
1096
+ ;
1097
+ "use strict";
1098
+ //mol/type/equals/equals.test.ts
1099
+ ;
1100
+ "use strict";
1101
+ //mol/type/writable/writable.test.ts
1102
+ ;
1103
+ "use strict";
1104
+ var $;
1105
+ (function ($) {
1106
+ })($ || ($ = {}));
1107
+ //mol/dom/context/context.ts
1108
+ ;
1109
+ "use strict";
1092
1110
  var $;
1093
1111
  (function ($) {
1094
1112
  $.$mol_dom_context = new $node.jsdom.JSDOM('', { url: 'https://localhost/' }).window;
@@ -1151,115 +1169,10 @@ var $;
1151
1169
  //mol/dom/render/children/children.ts
1152
1170
  ;
1153
1171
  "use strict";
1154
- //mol/type/error/error.ts
1155
- ;
1156
- "use strict";
1157
- //mol/type/assert/assert.test.ts
1158
- ;
1159
- "use strict";
1160
- //mol/type/assert/assert.ts
1161
- ;
1162
- "use strict";
1163
- //mol/type/equals/equals.test.ts
1164
- ;
1165
- "use strict";
1166
- //mol/type/equals/equals.ts
1167
- ;
1168
- "use strict";
1169
- //mol/type/partial/deep/deep.test.ts
1170
- ;
1171
- "use strict";
1172
1172
  //mol/type/partial/deep/deep.ts
1173
1173
  ;
1174
1174
  "use strict";
1175
- var $;
1176
- (function ($) {
1177
- $mol_test({
1178
- 'Make empty div'() {
1179
- $mol_assert_equal(($mol_jsx("div", null)).outerHTML, '<div></div>');
1180
- },
1181
- 'Define native field'() {
1182
- const dom = $mol_jsx("input", { value: '123' });
1183
- $mol_assert_equal(dom.outerHTML, '<input value="123">');
1184
- $mol_assert_equal(dom.value, '123');
1185
- },
1186
- 'Define classes'() {
1187
- const dom = $mol_jsx("div", { class: 'foo bar' });
1188
- $mol_assert_equal(dom.outerHTML, '<div class="foo bar"></div>');
1189
- },
1190
- 'Define styles'() {
1191
- const dom = $mol_jsx("div", { style: { color: 'red' } });
1192
- $mol_assert_equal(dom.outerHTML, '<div style="color: red;"></div>');
1193
- },
1194
- 'Define dataset'() {
1195
- const dom = $mol_jsx("div", { dataset: { foo: 'bar' } });
1196
- $mol_assert_equal(dom.outerHTML, '<div data-foo="bar"></div>');
1197
- },
1198
- 'Define attributes'() {
1199
- const dom = $mol_jsx("div", { lang: "ru", hidden: true });
1200
- $mol_assert_equal(dom.outerHTML, '<div lang="ru" hidden=""></div>');
1201
- },
1202
- 'Define child nodes'() {
1203
- const dom = $mol_jsx("div", null,
1204
- "hello",
1205
- $mol_jsx("strong", null, "world"),
1206
- "!");
1207
- $mol_assert_equal(dom.outerHTML, '<div>hello<strong>world</strong>!</div>');
1208
- },
1209
- 'Function as component'() {
1210
- const Button = (props, target) => {
1211
- return $mol_jsx("button", { title: props.hint }, target());
1212
- };
1213
- const dom = $mol_jsx(Button, { id: "foo", hint: "click me" }, () => 'hey!');
1214
- $mol_assert_equal(dom.outerHTML, '<button id="foo" title="click me" class="Button">hey!</button>');
1215
- },
1216
- 'Nested guid generation'() {
1217
- const Foo = () => {
1218
- return $mol_jsx("div", null,
1219
- $mol_jsx(Bar, { id: "bar" },
1220
- $mol_jsx("img", { id: "icon" })));
1221
- };
1222
- const Bar = (props, icon) => {
1223
- return $mol_jsx("span", null,
1224
- icon,
1225
- $mol_jsx("i", { id: "label" }));
1226
- };
1227
- const dom = $mol_jsx(Foo, { id: "foo" });
1228
- $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>');
1229
- },
1230
- 'Fail on non unique ids'() {
1231
- const App = () => {
1232
- return $mol_jsx("div", null,
1233
- $mol_jsx("span", { id: "bar" }),
1234
- $mol_jsx("span", { id: "bar" }));
1235
- };
1236
- $mol_assert_fail(() => $mol_jsx(App, { id: "foo" }), 'JSX already has tag with id "foo/bar"');
1237
- },
1238
- 'Owner based guid generationn'() {
1239
- const Foo = () => {
1240
- return $mol_jsx("div", null,
1241
- $mol_jsx(Bar, { id: "middle", icon: () => $mol_jsx("img", { id: "icon" }) }));
1242
- };
1243
- const Bar = (props) => {
1244
- return $mol_jsx("span", null, props.icon());
1245
- };
1246
- const dom = $mol_jsx(Foo, { id: "app" });
1247
- $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>');
1248
- },
1249
- 'Fail on same ids from different caller'() {
1250
- const Foo = () => {
1251
- return $mol_jsx("div", null,
1252
- $mol_jsx("img", { id: "icon" }),
1253
- $mol_jsx(Bar, { id: "bar", icon: () => $mol_jsx("img", { id: "icon" }) }));
1254
- };
1255
- const Bar = (props) => {
1256
- return $mol_jsx("span", null, props.icon());
1257
- };
1258
- $mol_assert_fail(() => $mol_jsx(Foo, { id: "foo" }), 'JSX already has tag with id "foo/icon"');
1259
- },
1260
- });
1261
- })($ || ($ = {}));
1262
- //mol/jsx/jsx.test.tsx
1175
+ //mol/type/partial/deep/deep.test.ts
1263
1176
  ;
1264
1177
  "use strict";
1265
1178
  var $;
@@ -1386,97 +1299,91 @@ var $;
1386
1299
  var $;
1387
1300
  (function ($) {
1388
1301
  $mol_test({
1389
- 'nulls & undefineds'() {
1390
- $mol_assert_ok($mol_compare_deep(null, null));
1391
- $mol_assert_ok($mol_compare_deep(undefined, undefined));
1392
- $mol_assert_not($mol_compare_deep(undefined, null));
1393
- $mol_assert_not($mol_compare_deep({}, null));
1302
+ 'Make empty div'() {
1303
+ $mol_assert_equal(($mol_jsx("div", null)).outerHTML, '<div></div>');
1394
1304
  },
1395
- 'number'() {
1396
- $mol_assert_ok($mol_compare_deep(1, 1));
1397
- $mol_assert_ok($mol_compare_deep(Number.NaN, Number.NaN));
1398
- $mol_assert_not($mol_compare_deep(1, 2));
1399
- $mol_assert_ok($mol_compare_deep(Object(1), Object(1)));
1400
- $mol_assert_not($mol_compare_deep(Object(1), Object(2)));
1305
+ 'Define native field'() {
1306
+ const dom = $mol_jsx("input", { value: '123' });
1307
+ $mol_assert_equal(dom.outerHTML, '<input value="123">');
1308
+ $mol_assert_equal(dom.value, '123');
1401
1309
  },
1402
- 'POJO'() {
1403
- $mol_assert_ok($mol_compare_deep({}, {}));
1404
- $mol_assert_not($mol_compare_deep({ a: 1 }, { b: 2 }));
1405
- $mol_assert_not($mol_compare_deep({ a: 1 }, { a: 2 }));
1406
- $mol_assert_not($mol_compare_deep({}, { a: undefined }));
1407
- $mol_assert_ok($mol_compare_deep({ a: 1, b: 2 }, { b: 2, a: 1 }));
1408
- $mol_assert_ok($mol_compare_deep({ a: { b: 1 } }, { a: { b: 1 } }));
1310
+ 'Define classes'() {
1311
+ const dom = $mol_jsx("div", { class: 'foo bar' });
1312
+ $mol_assert_equal(dom.outerHTML, '<div class="foo bar"></div>');
1409
1313
  },
1410
- 'Array'() {
1411
- $mol_assert_ok($mol_compare_deep([], []));
1412
- $mol_assert_ok($mol_compare_deep([1, [2]], [1, [2]]));
1413
- $mol_assert_not($mol_compare_deep([1, 2], [1, 3]));
1414
- $mol_assert_not($mol_compare_deep([1, 2,], [1, 3, undefined]));
1314
+ 'Define styles'() {
1315
+ const dom = $mol_jsx("div", { style: { color: 'red' } });
1316
+ $mol_assert_equal(dom.outerHTML, '<div style="color: red;"></div>');
1415
1317
  },
1416
- 'Non POJO are different'() {
1417
- class Thing extends Object {
1418
- }
1419
- $mol_assert_not($mol_compare_deep(new Thing, new Thing));
1420
- $mol_assert_not($mol_compare_deep(() => 1, () => 1));
1421
- $mol_assert_not($mol_compare_deep(new RangeError('Test error'), new RangeError('Test error')));
1318
+ 'Define dataset'() {
1319
+ const dom = $mol_jsx("div", { dataset: { foo: 'bar' } });
1320
+ $mol_assert_equal(dom.outerHTML, '<div data-foo="bar"></div>');
1422
1321
  },
1423
- 'same POJOs with cyclic reference'() {
1424
- const a = { foo: {} };
1425
- a['self'] = a;
1426
- const b = { foo: {} };
1427
- b['self'] = b;
1428
- $mol_assert_ok($mol_compare_deep(a, b));
1322
+ 'Define attributes'() {
1323
+ const dom = $mol_jsx("div", { lang: "ru", hidden: true });
1324
+ $mol_assert_equal(dom.outerHTML, '<div lang="ru" hidden=""></div>');
1429
1325
  },
1430
- 'Date'() {
1431
- $mol_assert_ok($mol_compare_deep(new Date(12345), new Date(12345)));
1432
- $mol_assert_not($mol_compare_deep(new Date(12345), new Date(12346)));
1326
+ 'Define child nodes'() {
1327
+ const dom = $mol_jsx("div", null,
1328
+ "hello",
1329
+ $mol_jsx("strong", null, "world"),
1330
+ "!");
1331
+ $mol_assert_equal(dom.outerHTML, '<div>hello<strong>world</strong>!</div>');
1433
1332
  },
1434
- 'RegExp'() {
1435
- $mol_assert_ok($mol_compare_deep(/\x22/mig, /\x22/mig));
1436
- $mol_assert_not($mol_compare_deep(/\x22/mig, /\x21/mig));
1437
- $mol_assert_not($mol_compare_deep(/\x22/mig, /\x22/mg));
1333
+ 'Function as component'() {
1334
+ const Button = (props, target) => {
1335
+ return $mol_jsx("button", { title: props.hint }, target());
1336
+ };
1337
+ const dom = $mol_jsx(Button, { id: "foo", hint: "click me" }, () => 'hey!');
1338
+ $mol_assert_equal(dom.outerHTML, '<button id="foo" title="click me" class="Button">hey!</button>');
1438
1339
  },
1439
- 'Error'() {
1440
- $mol_assert_not($mol_compare_deep(new Error('xxx'), new Error('xxx')));
1441
- const fail = (message) => new Error(message);
1442
- $mol_assert_ok($mol_compare_deep(...['xxx', 'xxx'].map(msg => new Error(msg))));
1443
- $mol_assert_not($mol_compare_deep(...['xxx', 'yyy'].map(msg => new Error(msg))));
1340
+ 'Nested guid generation'() {
1341
+ const Foo = () => {
1342
+ return $mol_jsx("div", null,
1343
+ $mol_jsx(Bar, { id: "bar" },
1344
+ $mol_jsx("img", { id: "icon" })));
1345
+ };
1346
+ const Bar = (props, icon) => {
1347
+ return $mol_jsx("span", null,
1348
+ icon,
1349
+ $mol_jsx("i", { id: "label" }));
1350
+ };
1351
+ const dom = $mol_jsx(Foo, { id: "foo" });
1352
+ $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>');
1444
1353
  },
1445
- 'Map'() {
1446
- $mol_assert_ok($mol_compare_deep(new Map, new Map));
1447
- $mol_assert_ok($mol_compare_deep(new Map([[1, [2]]]), new Map([[1, [2]]])));
1448
- $mol_assert_ok($mol_compare_deep(new Map([[[1], 2]]), new Map([[[1], 2]])));
1449
- $mol_assert_not($mol_compare_deep(new Map([[1, 2]]), new Map([[1, 3]])));
1450
- $mol_assert_not($mol_compare_deep(new Map([[[1], 2]]), new Map([[[3], 2]])));
1451
- },
1452
- 'Set'() {
1453
- $mol_assert_ok($mol_compare_deep(new Set, new Set));
1454
- $mol_assert_ok($mol_compare_deep(new Set([1, [2]]), new Set([1, [2]])));
1455
- $mol_assert_not($mol_compare_deep(new Set([1]), new Set([2])));
1354
+ 'Fail on non unique ids'() {
1355
+ const App = () => {
1356
+ return $mol_jsx("div", null,
1357
+ $mol_jsx("span", { id: "bar" }),
1358
+ $mol_jsx("span", { id: "bar" }));
1359
+ };
1360
+ $mol_assert_fail(() => $mol_jsx(App, { id: "foo" }), 'JSX already has tag with id "foo/bar"');
1456
1361
  },
1457
- 'Uint8Array'() {
1458
- $mol_assert_ok($mol_compare_deep(new Uint8Array, new Uint8Array));
1459
- $mol_assert_ok($mol_compare_deep(new Uint8Array([0]), new Uint8Array([0])));
1460
- $mol_assert_not($mol_compare_deep(new Uint8Array([0]), new Uint8Array([1])));
1362
+ 'Owner based guid generationn'() {
1363
+ const Foo = () => {
1364
+ return $mol_jsx("div", null,
1365
+ $mol_jsx(Bar, { id: "middle", icon: () => $mol_jsx("img", { id: "icon" }) }));
1366
+ };
1367
+ const Bar = (props) => {
1368
+ return $mol_jsx("span", null, props.icon());
1369
+ };
1370
+ const dom = $mol_jsx(Foo, { id: "app" });
1371
+ $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>');
1461
1372
  },
1462
- 'Custom comparator'() {
1463
- class User {
1464
- name;
1465
- rand;
1466
- constructor(name, rand = Math.random()) {
1467
- this.name = name;
1468
- this.rand = rand;
1469
- }
1470
- [Symbol.toPrimitive](mode) {
1471
- return this.name;
1472
- }
1473
- }
1474
- $mol_assert_ok($mol_compare_deep(new User('Jin'), new User('Jin')));
1475
- $mol_assert_not($mol_compare_deep(new User('Jin'), new User('John')));
1373
+ 'Fail on same ids from different caller'() {
1374
+ const Foo = () => {
1375
+ return $mol_jsx("div", null,
1376
+ $mol_jsx("img", { id: "icon" }),
1377
+ $mol_jsx(Bar, { id: "bar", icon: () => $mol_jsx("img", { id: "icon" }) }));
1378
+ };
1379
+ const Bar = (props) => {
1380
+ return $mol_jsx("span", null, props.icon());
1381
+ };
1382
+ $mol_assert_fail(() => $mol_jsx(Foo, { id: "foo" }), 'JSX already has tag with id "foo/icon"');
1476
1383
  },
1477
1384
  });
1478
1385
  })($ || ($ = {}));
1479
- //mol/compare/deep/deep.test.tsx
1386
+ //mol/jsx/jsx.test.tsx
1480
1387
  ;
1481
1388
  "use strict";
1482
1389
  var $;
@@ -1605,46 +1512,110 @@ var $;
1605
1512
  ;
1606
1513
  "use strict";
1607
1514
  var $;
1608
- (function ($) {
1609
- function $mol_dom_serialize(node) {
1610
- const serializer = new $mol_dom_context.XMLSerializer;
1611
- return serializer.serializeToString(node);
1612
- }
1613
- $.$mol_dom_serialize = $mol_dom_serialize;
1614
- })($ || ($ = {}));
1615
- //mol/dom/serialize/serialize.ts
1616
- ;
1617
- "use strict";
1618
- var $;
1619
1515
  (function ($) {
1620
1516
  $mol_test({
1621
- 'must be false'() {
1622
- $mol_assert_not(0);
1517
+ 'nulls & undefineds'() {
1518
+ $mol_assert_ok($mol_compare_deep(null, null));
1519
+ $mol_assert_ok($mol_compare_deep(undefined, undefined));
1520
+ $mol_assert_not($mol_compare_deep(undefined, null));
1521
+ $mol_assert_not($mol_compare_deep({}, null));
1623
1522
  },
1624
- 'must be true'() {
1625
- $mol_assert_ok(1);
1523
+ 'number'() {
1524
+ $mol_assert_ok($mol_compare_deep(1, 1));
1525
+ $mol_assert_ok($mol_compare_deep(Number.NaN, Number.NaN));
1526
+ $mol_assert_not($mol_compare_deep(1, 2));
1527
+ $mol_assert_ok($mol_compare_deep(Object(1), Object(1)));
1528
+ $mol_assert_not($mol_compare_deep(Object(1), Object(2)));
1626
1529
  },
1627
- 'two must be equal'() {
1628
- $mol_assert_equal(2, 2);
1530
+ 'POJO'() {
1531
+ $mol_assert_ok($mol_compare_deep({}, {}));
1532
+ $mol_assert_not($mol_compare_deep({ a: 1 }, { b: 2 }));
1533
+ $mol_assert_not($mol_compare_deep({ a: 1 }, { a: 2 }));
1534
+ $mol_assert_not($mol_compare_deep({}, { a: undefined }));
1535
+ $mol_assert_ok($mol_compare_deep({ a: 1, b: 2 }, { b: 2, a: 1 }));
1536
+ $mol_assert_ok($mol_compare_deep({ a: { b: 1 } }, { a: { b: 1 } }));
1629
1537
  },
1630
- 'three must be equal'() {
1631
- $mol_assert_equal(2, 2, 2);
1538
+ 'Array'() {
1539
+ $mol_assert_ok($mol_compare_deep([], []));
1540
+ $mol_assert_ok($mol_compare_deep([1, [2]], [1, [2]]));
1541
+ $mol_assert_not($mol_compare_deep([1, 2], [1, 3]));
1542
+ $mol_assert_not($mol_compare_deep([1, 2,], [1, 3, undefined]));
1632
1543
  },
1633
- 'two must be unique'() {
1634
- $mol_assert_unique([3], [3]);
1544
+ 'Non POJO are different'() {
1545
+ class Thing extends Object {
1546
+ }
1547
+ $mol_assert_not($mol_compare_deep(new Thing, new Thing));
1548
+ $mol_assert_not($mol_compare_deep(() => 1, () => 1));
1549
+ $mol_assert_not($mol_compare_deep(new RangeError('Test error'), new RangeError('Test error')));
1635
1550
  },
1636
- 'three must be unique'() {
1637
- $mol_assert_unique([3], [3], [3]);
1551
+ 'same POJOs with cyclic reference'() {
1552
+ const a = { foo: {} };
1553
+ a['self'] = a;
1554
+ const b = { foo: {} };
1555
+ b['self'] = b;
1556
+ $mol_assert_ok($mol_compare_deep(a, b));
1638
1557
  },
1639
- 'two must be alike'() {
1640
- $mol_assert_like([3], [3]);
1558
+ 'Date'() {
1559
+ $mol_assert_ok($mol_compare_deep(new Date(12345), new Date(12345)));
1560
+ $mol_assert_not($mol_compare_deep(new Date(12345), new Date(12346)));
1641
1561
  },
1642
- 'three must be alike'() {
1643
- $mol_assert_like([3], [3], [3]);
1562
+ 'RegExp'() {
1563
+ $mol_assert_ok($mol_compare_deep(/\x22/mig, /\x22/mig));
1564
+ $mol_assert_not($mol_compare_deep(/\x22/mig, /\x21/mig));
1565
+ $mol_assert_not($mol_compare_deep(/\x22/mig, /\x22/mg));
1566
+ },
1567
+ 'Error'() {
1568
+ $mol_assert_not($mol_compare_deep(new Error('xxx'), new Error('xxx')));
1569
+ const fail = (message) => new Error(message);
1570
+ $mol_assert_ok($mol_compare_deep(...['xxx', 'xxx'].map(msg => new Error(msg))));
1571
+ $mol_assert_not($mol_compare_deep(...['xxx', 'yyy'].map(msg => new Error(msg))));
1572
+ },
1573
+ 'Map'() {
1574
+ $mol_assert_ok($mol_compare_deep(new Map, new Map));
1575
+ $mol_assert_ok($mol_compare_deep(new Map([[1, [2]]]), new Map([[1, [2]]])));
1576
+ $mol_assert_ok($mol_compare_deep(new Map([[[1], 2]]), new Map([[[1], 2]])));
1577
+ $mol_assert_not($mol_compare_deep(new Map([[1, 2]]), new Map([[1, 3]])));
1578
+ $mol_assert_not($mol_compare_deep(new Map([[[1], 2]]), new Map([[[3], 2]])));
1579
+ },
1580
+ 'Set'() {
1581
+ $mol_assert_ok($mol_compare_deep(new Set, new Set));
1582
+ $mol_assert_ok($mol_compare_deep(new Set([1, [2]]), new Set([1, [2]])));
1583
+ $mol_assert_not($mol_compare_deep(new Set([1]), new Set([2])));
1584
+ },
1585
+ 'Uint8Array'() {
1586
+ $mol_assert_ok($mol_compare_deep(new Uint8Array, new Uint8Array));
1587
+ $mol_assert_ok($mol_compare_deep(new Uint8Array([0]), new Uint8Array([0])));
1588
+ $mol_assert_not($mol_compare_deep(new Uint8Array([0]), new Uint8Array([1])));
1589
+ },
1590
+ 'Custom comparator'() {
1591
+ class User {
1592
+ name;
1593
+ rand;
1594
+ constructor(name, rand = Math.random()) {
1595
+ this.name = name;
1596
+ this.rand = rand;
1597
+ }
1598
+ [Symbol.toPrimitive](mode) {
1599
+ return this.name;
1600
+ }
1601
+ }
1602
+ $mol_assert_ok($mol_compare_deep(new User('Jin'), new User('Jin')));
1603
+ $mol_assert_not($mol_compare_deep(new User('Jin'), new User('John')));
1644
1604
  },
1645
1605
  });
1646
1606
  })($ || ($ = {}));
1647
- //mol/assert/assert.test.ts
1607
+ //mol/compare/deep/deep.test.tsx
1608
+ ;
1609
+ "use strict";
1610
+ var $;
1611
+ (function ($) {
1612
+ function $mol_dom_serialize(node) {
1613
+ const serializer = new $mol_dom_context.XMLSerializer;
1614
+ return serializer.serializeToString(node);
1615
+ }
1616
+ $.$mol_dom_serialize = $mol_dom_serialize;
1617
+ })($ || ($ = {}));
1618
+ //mol/dom/serialize/serialize.ts
1648
1619
  ;
1649
1620
  "use strict";
1650
1621
  var $;
@@ -1742,6 +1713,38 @@ var $;
1742
1713
  ;
1743
1714
  "use strict";
1744
1715
  var $;
1716
+ (function ($) {
1717
+ $mol_test({
1718
+ 'must be false'() {
1719
+ $mol_assert_not(0);
1720
+ },
1721
+ 'must be true'() {
1722
+ $mol_assert_ok(1);
1723
+ },
1724
+ 'two must be equal'() {
1725
+ $mol_assert_equal(2, 2);
1726
+ },
1727
+ 'three must be equal'() {
1728
+ $mol_assert_equal(2, 2, 2);
1729
+ },
1730
+ 'two must be unique'() {
1731
+ $mol_assert_unique([3], [3]);
1732
+ },
1733
+ 'three must be unique'() {
1734
+ $mol_assert_unique([3], [3], [3]);
1735
+ },
1736
+ 'two must be alike'() {
1737
+ $mol_assert_like([3], [3]);
1738
+ },
1739
+ 'three must be alike'() {
1740
+ $mol_assert_like([3], [3], [3]);
1741
+ },
1742
+ });
1743
+ })($ || ($ = {}));
1744
+ //mol/assert/assert.test.ts
1745
+ ;
1746
+ "use strict";
1747
+ var $;
1745
1748
  (function ($) {
1746
1749
  $mol_test({
1747
1750
  'get'() {
@@ -1804,7 +1807,50 @@ var $;
1804
1807
  //mol/delegate/delegate.test.ts
1805
1808
  ;
1806
1809
  "use strict";
1807
- //mol/type/writable/writable.test.ts
1810
+ var $;
1811
+ (function ($) {
1812
+ const named = new WeakSet();
1813
+ function $mol_func_name(func) {
1814
+ let name = func.name;
1815
+ if (name?.length > 1)
1816
+ return name;
1817
+ if (named.has(func))
1818
+ return name;
1819
+ for (let key in this) {
1820
+ try {
1821
+ if (this[key] !== func)
1822
+ continue;
1823
+ name = key;
1824
+ Object.defineProperty(func, 'name', { value: name });
1825
+ break;
1826
+ }
1827
+ catch { }
1828
+ }
1829
+ named.add(func);
1830
+ return name;
1831
+ }
1832
+ $.$mol_func_name = $mol_func_name;
1833
+ function $mol_func_name_from(target, source) {
1834
+ Object.defineProperty(target, 'name', { value: source.name });
1835
+ return target;
1836
+ }
1837
+ $.$mol_func_name_from = $mol_func_name_from;
1838
+ })($ || ($ = {}));
1839
+ //mol/func/name/name.ts
1840
+ ;
1841
+ "use strict";
1842
+ var $;
1843
+ (function ($_1) {
1844
+ $mol_test({
1845
+ 'FQN of anon function'($) {
1846
+ const $$ = Object.assign($, { $mol_func_name_test: (() => () => { })() });
1847
+ $mol_assert_equal($$.$mol_func_name_test.name, '');
1848
+ $mol_assert_equal($$.$mol_func_name($$.$mol_func_name_test), '$mol_func_name_test');
1849
+ $mol_assert_equal($$.$mol_func_name_test.name, '$mol_func_name_test');
1850
+ },
1851
+ });
1852
+ })($ || ($ = {}));
1853
+ //mol/func/name/name.test.ts
1808
1854
  ;
1809
1855
  "use strict";
1810
1856
  var $;
@@ -1868,52 +1914,6 @@ var $;
1868
1914
  ;
1869
1915
  "use strict";
1870
1916
  var $;
1871
- (function ($_1) {
1872
- $mol_test({
1873
- 'FQN of anon function'($) {
1874
- const $$ = Object.assign($, { $mol_func_name_test: (() => () => { })() });
1875
- $mol_assert_equal($$.$mol_func_name_test.name, '');
1876
- $mol_assert_equal($$.$mol_func_name($$.$mol_func_name_test), '$mol_func_name_test');
1877
- $mol_assert_equal($$.$mol_func_name_test.name, '$mol_func_name_test');
1878
- },
1879
- });
1880
- })($ || ($ = {}));
1881
- //mol/func/name/name.test.ts
1882
- ;
1883
- "use strict";
1884
- var $;
1885
- (function ($) {
1886
- const named = new WeakSet();
1887
- function $mol_func_name(func) {
1888
- let name = func.name;
1889
- if (name?.length > 1)
1890
- return name;
1891
- if (named.has(func))
1892
- return name;
1893
- for (let key in this) {
1894
- try {
1895
- if (this[key] !== func)
1896
- continue;
1897
- name = key;
1898
- Object.defineProperty(func, 'name', { value: name });
1899
- break;
1900
- }
1901
- catch { }
1902
- }
1903
- named.add(func);
1904
- return name;
1905
- }
1906
- $.$mol_func_name = $mol_func_name;
1907
- function $mol_func_name_from(target, source) {
1908
- Object.defineProperty(target, 'name', { value: source.name });
1909
- return target;
1910
- }
1911
- $.$mol_func_name_from = $mol_func_name_from;
1912
- })($ || ($ = {}));
1913
- //mol/func/name/name.ts
1914
- ;
1915
- "use strict";
1916
- var $;
1917
1917
  (function ($) {
1918
1918
  $mol_test({
1919
1919
  async 'sizes'() {