mol_db 0.0.572 → 0.0.574

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
  var $;
@@ -959,16 +959,6 @@ var $;
959
959
  ;
960
960
  "use strict";
961
961
  var $;
962
- (function ($) {
963
- function $mol_test_complete() {
964
- process.exit(0);
965
- }
966
- $.$mol_test_complete = $mol_test_complete;
967
- })($ || ($ = {}));
968
- //mol/test/test.node.test.ts
969
- ;
970
- "use strict";
971
- var $;
972
962
  (function ($_1) {
973
963
  function $mol_test(set) {
974
964
  for (let name in set) {
@@ -1056,35 +1046,13 @@ var $;
1056
1046
  ;
1057
1047
  "use strict";
1058
1048
  var $;
1059
- (function ($_1) {
1060
- $mol_test_mocks.push($ => {
1061
- $.$mol_log3_come = () => { };
1062
- $.$mol_log3_done = () => { };
1063
- $.$mol_log3_fail = () => { };
1064
- $.$mol_log3_warn = () => { };
1065
- $.$mol_log3_rise = () => { };
1066
- $.$mol_log3_area = () => () => { };
1067
- });
1049
+ (function ($) {
1050
+ function $mol_test_complete() {
1051
+ process.exit(0);
1052
+ }
1053
+ $.$mol_test_complete = $mol_test_complete;
1068
1054
  })($ || ($ = {}));
1069
- //mol/log3/log3.test.ts
1070
- ;
1071
- "use strict";
1072
- //mol/type/error/error.ts
1073
- ;
1074
- "use strict";
1075
- //mol/type/assert/assert.ts
1076
- ;
1077
- "use strict";
1078
- //mol/type/assert/assert.test.ts
1079
- ;
1080
- "use strict";
1081
- //mol/type/equals/equals.ts
1082
- ;
1083
- "use strict";
1084
- //mol/type/equals/equals.test.ts
1085
- ;
1086
- "use strict";
1087
- //mol/type/writable/writable.test.ts
1055
+ //mol/test/test.node.test.ts
1088
1056
  ;
1089
1057
  "use strict";
1090
1058
  var $;
@@ -1142,100 +1110,19 @@ var $;
1142
1110
  //mol/dom/render/children/children.ts
1143
1111
  ;
1144
1112
  "use strict";
1145
- //mol/type/partial/deep/deep.ts
1113
+ //mol/type/error/error.ts
1146
1114
  ;
1147
1115
  "use strict";
1148
- //mol/type/partial/deep/deep.test.ts
1116
+ //mol/type/assert/assert.ts
1149
1117
  ;
1150
1118
  "use strict";
1151
- var $;
1152
- (function ($) {
1153
- $mol_test({
1154
- 'Make empty div'() {
1155
- $mol_assert_equal(($mol_jsx("div", null)).outerHTML, '<div></div>');
1156
- },
1157
- 'Define native field'() {
1158
- const dom = $mol_jsx("input", { value: '123' });
1159
- $mol_assert_equal(dom.outerHTML, '<input value="123">');
1160
- $mol_assert_equal(dom.value, '123');
1161
- },
1162
- 'Define classes'() {
1163
- const dom = $mol_jsx("div", { class: 'foo bar' });
1164
- $mol_assert_equal(dom.outerHTML, '<div class="foo bar"></div>');
1165
- },
1166
- 'Define styles'() {
1167
- const dom = $mol_jsx("div", { style: { color: 'red' } });
1168
- $mol_assert_equal(dom.outerHTML, '<div style="color: red;"></div>');
1169
- },
1170
- 'Define dataset'() {
1171
- const dom = $mol_jsx("div", { dataset: { foo: 'bar' } });
1172
- $mol_assert_equal(dom.outerHTML, '<div data-foo="bar"></div>');
1173
- },
1174
- 'Define attributes'() {
1175
- const dom = $mol_jsx("div", { lang: "ru", hidden: true });
1176
- $mol_assert_equal(dom.outerHTML, '<div lang="ru" hidden=""></div>');
1177
- },
1178
- 'Define child nodes'() {
1179
- const dom = $mol_jsx("div", null,
1180
- "hello",
1181
- $mol_jsx("strong", null, "world"),
1182
- "!");
1183
- $mol_assert_equal(dom.outerHTML, '<div>hello<strong>world</strong>!</div>');
1184
- },
1185
- 'Function as component'() {
1186
- const Button = (props, target) => {
1187
- return $mol_jsx("button", { title: props.hint }, target());
1188
- };
1189
- const dom = $mol_jsx(Button, { id: "foo", hint: "click me" }, () => 'hey!');
1190
- $mol_assert_equal(dom.outerHTML, '<button id="foo" title="click me" class="Button">hey!</button>');
1191
- },
1192
- 'Nested guid generation'() {
1193
- const Foo = () => {
1194
- return $mol_jsx("div", null,
1195
- $mol_jsx(Bar, { id: "bar" },
1196
- $mol_jsx("img", { id: "icon" })));
1197
- };
1198
- const Bar = (props, icon) => {
1199
- return $mol_jsx("span", null,
1200
- icon,
1201
- $mol_jsx("i", { id: "label" }));
1202
- };
1203
- const dom = $mol_jsx(Foo, { id: "foo" });
1204
- $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>');
1205
- },
1206
- 'Fail on non unique ids'() {
1207
- const App = () => {
1208
- return $mol_jsx("div", null,
1209
- $mol_jsx("span", { id: "bar" }),
1210
- $mol_jsx("span", { id: "bar" }));
1211
- };
1212
- $mol_assert_fail(() => $mol_jsx(App, { id: "foo" }), 'JSX already has tag with id "foo/bar"');
1213
- },
1214
- 'Owner based guid generationn'() {
1215
- const Foo = () => {
1216
- return $mol_jsx("div", null,
1217
- $mol_jsx(Bar, { id: "middle", icon: () => $mol_jsx("img", { id: "icon" }) }));
1218
- };
1219
- const Bar = (props) => {
1220
- return $mol_jsx("span", null, props.icon());
1221
- };
1222
- const dom = $mol_jsx(Foo, { id: "app" });
1223
- $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>');
1224
- },
1225
- 'Fail on same ids from different caller'() {
1226
- const Foo = () => {
1227
- return $mol_jsx("div", null,
1228
- $mol_jsx("img", { id: "icon" }),
1229
- $mol_jsx(Bar, { id: "bar", icon: () => $mol_jsx("img", { id: "icon" }) }));
1230
- };
1231
- const Bar = (props) => {
1232
- return $mol_jsx("span", null, props.icon());
1233
- };
1234
- $mol_assert_fail(() => $mol_jsx(Foo, { id: "foo" }), 'JSX already has tag with id "foo/icon"');
1235
- },
1236
- });
1237
- })($ || ($ = {}));
1238
- //mol/jsx/jsx.test.tsx
1119
+ //mol/type/assert/assert.test.ts
1120
+ ;
1121
+ "use strict";
1122
+ //mol/type/partial/deep/deep.ts
1123
+ ;
1124
+ "use strict";
1125
+ //mol/type/partial/deep/deep.test.ts
1239
1126
  ;
1240
1127
  "use strict";
1241
1128
  var $;
@@ -1362,97 +1249,91 @@ var $;
1362
1249
  var $;
1363
1250
  (function ($) {
1364
1251
  $mol_test({
1365
- 'nulls & undefineds'() {
1366
- $mol_assert_ok($mol_compare_deep(null, null));
1367
- $mol_assert_ok($mol_compare_deep(undefined, undefined));
1368
- $mol_assert_not($mol_compare_deep(undefined, null));
1369
- $mol_assert_not($mol_compare_deep({}, null));
1370
- },
1371
- 'number'() {
1372
- $mol_assert_ok($mol_compare_deep(1, 1));
1373
- $mol_assert_ok($mol_compare_deep(Number.NaN, Number.NaN));
1374
- $mol_assert_not($mol_compare_deep(1, 2));
1375
- $mol_assert_ok($mol_compare_deep(Object(1), Object(1)));
1376
- $mol_assert_not($mol_compare_deep(Object(1), Object(2)));
1252
+ 'Make empty div'() {
1253
+ $mol_assert_equal(($mol_jsx("div", null)).outerHTML, '<div></div>');
1377
1254
  },
1378
- 'POJO'() {
1379
- $mol_assert_ok($mol_compare_deep({}, {}));
1380
- $mol_assert_not($mol_compare_deep({ a: 1 }, { b: 2 }));
1381
- $mol_assert_not($mol_compare_deep({ a: 1 }, { a: 2 }));
1382
- $mol_assert_not($mol_compare_deep({}, { a: undefined }));
1383
- $mol_assert_ok($mol_compare_deep({ a: 1, b: 2 }, { b: 2, a: 1 }));
1384
- $mol_assert_ok($mol_compare_deep({ a: { b: 1 } }, { a: { b: 1 } }));
1255
+ 'Define native field'() {
1256
+ const dom = $mol_jsx("input", { value: '123' });
1257
+ $mol_assert_equal(dom.outerHTML, '<input value="123">');
1258
+ $mol_assert_equal(dom.value, '123');
1385
1259
  },
1386
- 'Array'() {
1387
- $mol_assert_ok($mol_compare_deep([], []));
1388
- $mol_assert_ok($mol_compare_deep([1, [2]], [1, [2]]));
1389
- $mol_assert_not($mol_compare_deep([1, 2], [1, 3]));
1390
- $mol_assert_not($mol_compare_deep([1, 2,], [1, 3, undefined]));
1260
+ 'Define classes'() {
1261
+ const dom = $mol_jsx("div", { class: 'foo bar' });
1262
+ $mol_assert_equal(dom.outerHTML, '<div class="foo bar"></div>');
1391
1263
  },
1392
- 'Non POJO are different'() {
1393
- class Thing extends Object {
1394
- }
1395
- $mol_assert_not($mol_compare_deep(new Thing, new Thing));
1396
- $mol_assert_not($mol_compare_deep(() => 1, () => 1));
1397
- $mol_assert_not($mol_compare_deep(new RangeError('Test error'), new RangeError('Test error')));
1264
+ 'Define styles'() {
1265
+ const dom = $mol_jsx("div", { style: { color: 'red' } });
1266
+ $mol_assert_equal(dom.outerHTML, '<div style="color: red;"></div>');
1398
1267
  },
1399
- 'same POJOs with cyclic reference'() {
1400
- const a = { foo: {} };
1401
- a['self'] = a;
1402
- const b = { foo: {} };
1403
- b['self'] = b;
1404
- $mol_assert_ok($mol_compare_deep(a, b));
1268
+ 'Define dataset'() {
1269
+ const dom = $mol_jsx("div", { dataset: { foo: 'bar' } });
1270
+ $mol_assert_equal(dom.outerHTML, '<div data-foo="bar"></div>');
1405
1271
  },
1406
- 'Date'() {
1407
- $mol_assert_ok($mol_compare_deep(new Date(12345), new Date(12345)));
1408
- $mol_assert_not($mol_compare_deep(new Date(12345), new Date(12346)));
1272
+ 'Define attributes'() {
1273
+ const dom = $mol_jsx("div", { lang: "ru", hidden: true });
1274
+ $mol_assert_equal(dom.outerHTML, '<div lang="ru" hidden=""></div>');
1409
1275
  },
1410
- 'RegExp'() {
1411
- $mol_assert_ok($mol_compare_deep(/\x22/mig, /\x22/mig));
1412
- $mol_assert_not($mol_compare_deep(/\x22/mig, /\x21/mig));
1413
- $mol_assert_not($mol_compare_deep(/\x22/mig, /\x22/mg));
1276
+ 'Define child nodes'() {
1277
+ const dom = $mol_jsx("div", null,
1278
+ "hello",
1279
+ $mol_jsx("strong", null, "world"),
1280
+ "!");
1281
+ $mol_assert_equal(dom.outerHTML, '<div>hello<strong>world</strong>!</div>');
1414
1282
  },
1415
- 'Error'() {
1416
- $mol_assert_not($mol_compare_deep(new Error('xxx'), new Error('xxx')));
1417
- const fail = (message) => new Error(message);
1418
- $mol_assert_ok($mol_compare_deep(...['xxx', 'xxx'].map(msg => new Error(msg))));
1419
- $mol_assert_not($mol_compare_deep(...['xxx', 'yyy'].map(msg => new Error(msg))));
1283
+ 'Function as component'() {
1284
+ const Button = (props, target) => {
1285
+ return $mol_jsx("button", { title: props.hint }, target());
1286
+ };
1287
+ const dom = $mol_jsx(Button, { id: "foo", hint: "click me" }, () => 'hey!');
1288
+ $mol_assert_equal(dom.outerHTML, '<button id="foo" title="click me" class="Button">hey!</button>');
1420
1289
  },
1421
- 'Map'() {
1422
- $mol_assert_ok($mol_compare_deep(new Map, new Map));
1423
- $mol_assert_ok($mol_compare_deep(new Map([[1, [2]]]), new Map([[1, [2]]])));
1424
- $mol_assert_ok($mol_compare_deep(new Map([[[1], 2]]), new Map([[[1], 2]])));
1425
- $mol_assert_not($mol_compare_deep(new Map([[1, 2]]), new Map([[1, 3]])));
1426
- $mol_assert_not($mol_compare_deep(new Map([[[1], 2]]), new Map([[[3], 2]])));
1290
+ 'Nested guid generation'() {
1291
+ const Foo = () => {
1292
+ return $mol_jsx("div", null,
1293
+ $mol_jsx(Bar, { id: "bar" },
1294
+ $mol_jsx("img", { id: "icon" })));
1295
+ };
1296
+ const Bar = (props, icon) => {
1297
+ return $mol_jsx("span", null,
1298
+ icon,
1299
+ $mol_jsx("i", { id: "label" }));
1300
+ };
1301
+ const dom = $mol_jsx(Foo, { id: "foo" });
1302
+ $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>');
1427
1303
  },
1428
- 'Set'() {
1429
- $mol_assert_ok($mol_compare_deep(new Set, new Set));
1430
- $mol_assert_ok($mol_compare_deep(new Set([1, [2]]), new Set([1, [2]])));
1431
- $mol_assert_not($mol_compare_deep(new Set([1]), new Set([2])));
1304
+ 'Fail on non unique ids'() {
1305
+ const App = () => {
1306
+ return $mol_jsx("div", null,
1307
+ $mol_jsx("span", { id: "bar" }),
1308
+ $mol_jsx("span", { id: "bar" }));
1309
+ };
1310
+ $mol_assert_fail(() => $mol_jsx(App, { id: "foo" }), 'JSX already has tag with id "foo/bar"');
1432
1311
  },
1433
- 'Uint8Array'() {
1434
- $mol_assert_ok($mol_compare_deep(new Uint8Array, new Uint8Array));
1435
- $mol_assert_ok($mol_compare_deep(new Uint8Array([0]), new Uint8Array([0])));
1436
- $mol_assert_not($mol_compare_deep(new Uint8Array([0]), new Uint8Array([1])));
1312
+ 'Owner based guid generationn'() {
1313
+ const Foo = () => {
1314
+ return $mol_jsx("div", null,
1315
+ $mol_jsx(Bar, { id: "middle", icon: () => $mol_jsx("img", { id: "icon" }) }));
1316
+ };
1317
+ const Bar = (props) => {
1318
+ return $mol_jsx("span", null, props.icon());
1319
+ };
1320
+ const dom = $mol_jsx(Foo, { id: "app" });
1321
+ $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>');
1437
1322
  },
1438
- 'Custom comparator'() {
1439
- class User {
1440
- name;
1441
- rand;
1442
- constructor(name, rand = Math.random()) {
1443
- this.name = name;
1444
- this.rand = rand;
1445
- }
1446
- [Symbol.toPrimitive](mode) {
1447
- return this.name;
1448
- }
1449
- }
1450
- $mol_assert_ok($mol_compare_deep(new User('Jin'), new User('Jin')));
1451
- $mol_assert_not($mol_compare_deep(new User('Jin'), new User('John')));
1323
+ 'Fail on same ids from different caller'() {
1324
+ const Foo = () => {
1325
+ return $mol_jsx("div", null,
1326
+ $mol_jsx("img", { id: "icon" }),
1327
+ $mol_jsx(Bar, { id: "bar", icon: () => $mol_jsx("img", { id: "icon" }) }));
1328
+ };
1329
+ const Bar = (props) => {
1330
+ return $mol_jsx("span", null, props.icon());
1331
+ };
1332
+ $mol_assert_fail(() => $mol_jsx(Foo, { id: "foo" }), 'JSX already has tag with id "foo/icon"');
1452
1333
  },
1453
1334
  });
1454
1335
  })($ || ($ = {}));
1455
- //mol/compare/deep/deep.test.tsx
1336
+ //mol/jsx/jsx.test.tsx
1456
1337
  ;
1457
1338
  "use strict";
1458
1339
  var $;
@@ -1581,6 +1462,102 @@ var $;
1581
1462
  ;
1582
1463
  "use strict";
1583
1464
  var $;
1465
+ (function ($) {
1466
+ $mol_test({
1467
+ 'nulls & undefineds'() {
1468
+ $mol_assert_ok($mol_compare_deep(null, null));
1469
+ $mol_assert_ok($mol_compare_deep(undefined, undefined));
1470
+ $mol_assert_not($mol_compare_deep(undefined, null));
1471
+ $mol_assert_not($mol_compare_deep({}, null));
1472
+ },
1473
+ 'number'() {
1474
+ $mol_assert_ok($mol_compare_deep(1, 1));
1475
+ $mol_assert_ok($mol_compare_deep(Number.NaN, Number.NaN));
1476
+ $mol_assert_not($mol_compare_deep(1, 2));
1477
+ $mol_assert_ok($mol_compare_deep(Object(1), Object(1)));
1478
+ $mol_assert_not($mol_compare_deep(Object(1), Object(2)));
1479
+ },
1480
+ 'POJO'() {
1481
+ $mol_assert_ok($mol_compare_deep({}, {}));
1482
+ $mol_assert_not($mol_compare_deep({ a: 1 }, { b: 2 }));
1483
+ $mol_assert_not($mol_compare_deep({ a: 1 }, { a: 2 }));
1484
+ $mol_assert_not($mol_compare_deep({}, { a: undefined }));
1485
+ $mol_assert_ok($mol_compare_deep({ a: 1, b: 2 }, { b: 2, a: 1 }));
1486
+ $mol_assert_ok($mol_compare_deep({ a: { b: 1 } }, { a: { b: 1 } }));
1487
+ },
1488
+ 'Array'() {
1489
+ $mol_assert_ok($mol_compare_deep([], []));
1490
+ $mol_assert_ok($mol_compare_deep([1, [2]], [1, [2]]));
1491
+ $mol_assert_not($mol_compare_deep([1, 2], [1, 3]));
1492
+ $mol_assert_not($mol_compare_deep([1, 2,], [1, 3, undefined]));
1493
+ },
1494
+ 'Non POJO are different'() {
1495
+ class Thing extends Object {
1496
+ }
1497
+ $mol_assert_not($mol_compare_deep(new Thing, new Thing));
1498
+ $mol_assert_not($mol_compare_deep(() => 1, () => 1));
1499
+ $mol_assert_not($mol_compare_deep(new RangeError('Test error'), new RangeError('Test error')));
1500
+ },
1501
+ 'same POJOs with cyclic reference'() {
1502
+ const a = { foo: {} };
1503
+ a['self'] = a;
1504
+ const b = { foo: {} };
1505
+ b['self'] = b;
1506
+ $mol_assert_ok($mol_compare_deep(a, b));
1507
+ },
1508
+ 'Date'() {
1509
+ $mol_assert_ok($mol_compare_deep(new Date(12345), new Date(12345)));
1510
+ $mol_assert_not($mol_compare_deep(new Date(12345), new Date(12346)));
1511
+ },
1512
+ 'RegExp'() {
1513
+ $mol_assert_ok($mol_compare_deep(/\x22/mig, /\x22/mig));
1514
+ $mol_assert_not($mol_compare_deep(/\x22/mig, /\x21/mig));
1515
+ $mol_assert_not($mol_compare_deep(/\x22/mig, /\x22/mg));
1516
+ },
1517
+ 'Error'() {
1518
+ $mol_assert_not($mol_compare_deep(new Error('xxx'), new Error('xxx')));
1519
+ const fail = (message) => new Error(message);
1520
+ $mol_assert_ok($mol_compare_deep(...['xxx', 'xxx'].map(msg => new Error(msg))));
1521
+ $mol_assert_not($mol_compare_deep(...['xxx', 'yyy'].map(msg => new Error(msg))));
1522
+ },
1523
+ 'Map'() {
1524
+ $mol_assert_ok($mol_compare_deep(new Map, new Map));
1525
+ $mol_assert_ok($mol_compare_deep(new Map([[1, [2]]]), new Map([[1, [2]]])));
1526
+ $mol_assert_ok($mol_compare_deep(new Map([[[1], 2]]), new Map([[[1], 2]])));
1527
+ $mol_assert_not($mol_compare_deep(new Map([[1, 2]]), new Map([[1, 3]])));
1528
+ $mol_assert_not($mol_compare_deep(new Map([[[1], 2]]), new Map([[[3], 2]])));
1529
+ },
1530
+ 'Set'() {
1531
+ $mol_assert_ok($mol_compare_deep(new Set, new Set));
1532
+ $mol_assert_ok($mol_compare_deep(new Set([1, [2]]), new Set([1, [2]])));
1533
+ $mol_assert_not($mol_compare_deep(new Set([1]), new Set([2])));
1534
+ },
1535
+ 'Uint8Array'() {
1536
+ $mol_assert_ok($mol_compare_deep(new Uint8Array, new Uint8Array));
1537
+ $mol_assert_ok($mol_compare_deep(new Uint8Array([0]), new Uint8Array([0])));
1538
+ $mol_assert_not($mol_compare_deep(new Uint8Array([0]), new Uint8Array([1])));
1539
+ },
1540
+ 'Custom comparator'() {
1541
+ class User {
1542
+ name;
1543
+ rand;
1544
+ constructor(name, rand = Math.random()) {
1545
+ this.name = name;
1546
+ this.rand = rand;
1547
+ }
1548
+ [Symbol.toPrimitive](mode) {
1549
+ return this.name;
1550
+ }
1551
+ }
1552
+ $mol_assert_ok($mol_compare_deep(new User('Jin'), new User('Jin')));
1553
+ $mol_assert_not($mol_compare_deep(new User('Jin'), new User('John')));
1554
+ },
1555
+ });
1556
+ })($ || ($ = {}));
1557
+ //mol/compare/deep/deep.test.tsx
1558
+ ;
1559
+ "use strict";
1560
+ var $;
1584
1561
  (function ($) {
1585
1562
  function $mol_dom_serialize(node) {
1586
1563
  const serializer = new $mol_dom_context.XMLSerializer;
@@ -1718,6 +1695,80 @@ var $;
1718
1695
  ;
1719
1696
  "use strict";
1720
1697
  var $;
1698
+ (function ($) {
1699
+ $mol_test({
1700
+ async 'put, get, drop, count records and clear store'() {
1701
+ const db = await $$.$mol_db('$mol_db_test', mig => mig.store_make('letters'));
1702
+ const trans = db.change('letters');
1703
+ try {
1704
+ const { letters } = trans.stores;
1705
+ $mol_assert_like(await letters.get(1), undefined);
1706
+ $mol_assert_like(await letters.get(2), undefined);
1707
+ $mol_assert_like(await letters.count(), 0);
1708
+ await letters.put('a');
1709
+ await letters.put('b', 1);
1710
+ await letters.put('c', 2);
1711
+ $mol_assert_like(await letters.get(1), 'b');
1712
+ $mol_assert_like(await letters.get(2), 'c');
1713
+ $mol_assert_like(await letters.count(), 2);
1714
+ await letters.drop(1);
1715
+ $mol_assert_like(await letters.get(1), undefined);
1716
+ $mol_assert_like(await letters.count(), 1);
1717
+ await letters.clear();
1718
+ $mol_assert_like(await letters.count(), 0);
1719
+ }
1720
+ finally {
1721
+ trans.abort();
1722
+ db.kill();
1723
+ }
1724
+ },
1725
+ async 'select by query'() {
1726
+ const db = await $$.$mol_db('$mol_db_test', mig => mig.store_make('letters'));
1727
+ const trans = db.change('letters');
1728
+ try {
1729
+ const { letters } = trans.stores;
1730
+ await letters.put('a');
1731
+ await letters.put('b');
1732
+ await letters.put('c');
1733
+ await letters.put('d');
1734
+ $mol_assert_like(await letters.select(), ['a', 'b', 'c', 'd']);
1735
+ $mol_assert_like(await letters.select(null, 2), ['a', 'b']);
1736
+ $mol_assert_like(await letters.select($mol_dom_context.IDBKeyRange.bound(2, 3)), ['b', 'c']);
1737
+ }
1738
+ finally {
1739
+ trans.abort();
1740
+ db.kill();
1741
+ }
1742
+ },
1743
+ });
1744
+ })($ || ($ = {}));
1745
+ //mol/db/store/store.test.ts
1746
+ ;
1747
+ "use strict";
1748
+ var $;
1749
+ (function ($_1) {
1750
+ $mol_test_mocks.push($ => {
1751
+ $.$mol_log3_come = () => { };
1752
+ $.$mol_log3_done = () => { };
1753
+ $.$mol_log3_fail = () => { };
1754
+ $.$mol_log3_warn = () => { };
1755
+ $.$mol_log3_rise = () => { };
1756
+ $.$mol_log3_area = () => () => { };
1757
+ });
1758
+ })($ || ($ = {}));
1759
+ //mol/log3/log3.test.ts
1760
+ ;
1761
+ "use strict";
1762
+ //mol/type/equals/equals.ts
1763
+ ;
1764
+ "use strict";
1765
+ //mol/type/equals/equals.test.ts
1766
+ ;
1767
+ "use strict";
1768
+ //mol/type/writable/writable.test.ts
1769
+ ;
1770
+ "use strict";
1771
+ var $;
1721
1772
  (function ($) {
1722
1773
  $mol_test({
1723
1774
  'get'() {
@@ -1781,52 +1832,6 @@ var $;
1781
1832
  ;
1782
1833
  "use strict";
1783
1834
  var $;
1784
- (function ($) {
1785
- const named = new WeakSet();
1786
- function $mol_func_name(func) {
1787
- let name = func.name;
1788
- if (name?.length > 1)
1789
- return name;
1790
- if (named.has(func))
1791
- return name;
1792
- for (let key in this) {
1793
- try {
1794
- if (this[key] !== func)
1795
- continue;
1796
- name = key;
1797
- Object.defineProperty(func, 'name', { value: name });
1798
- break;
1799
- }
1800
- catch { }
1801
- }
1802
- named.add(func);
1803
- return name;
1804
- }
1805
- $.$mol_func_name = $mol_func_name;
1806
- function $mol_func_name_from(target, source) {
1807
- Object.defineProperty(target, 'name', { value: source.name });
1808
- return target;
1809
- }
1810
- $.$mol_func_name_from = $mol_func_name_from;
1811
- })($ || ($ = {}));
1812
- //mol/func/name/name.ts
1813
- ;
1814
- "use strict";
1815
- var $;
1816
- (function ($_1) {
1817
- $mol_test({
1818
- 'FQN of anon function'($) {
1819
- const $$ = Object.assign($, { $mol_func_name_test: (() => () => { })() });
1820
- $mol_assert_equal($$.$mol_func_name_test.name, '');
1821
- $mol_assert_equal($$.$mol_func_name($$.$mol_func_name_test), '$mol_func_name_test');
1822
- $mol_assert_equal($$.$mol_func_name_test.name, '$mol_func_name_test');
1823
- },
1824
- });
1825
- })($ || ($ = {}));
1826
- //mol/func/name/name.test.ts
1827
- ;
1828
- "use strict";
1829
- var $;
1830
1835
  (function ($_1) {
1831
1836
  $mol_test({
1832
1837
  'tree parsing'() {
@@ -1888,53 +1893,48 @@ var $;
1888
1893
  "use strict";
1889
1894
  var $;
1890
1895
  (function ($) {
1891
- $mol_test({
1892
- async 'put, get, drop, count records and clear store'() {
1893
- const db = await $$.$mol_db('$mol_db_test', mig => mig.store_make('letters'));
1894
- const trans = db.change('letters');
1895
- try {
1896
- const { letters } = trans.stores;
1897
- $mol_assert_like(await letters.get(1), undefined);
1898
- $mol_assert_like(await letters.get(2), undefined);
1899
- $mol_assert_like(await letters.count(), 0);
1900
- await letters.put('a');
1901
- await letters.put('b', 1);
1902
- await letters.put('c', 2);
1903
- $mol_assert_like(await letters.get(1), 'b');
1904
- $mol_assert_like(await letters.get(2), 'c');
1905
- $mol_assert_like(await letters.count(), 2);
1906
- await letters.drop(1);
1907
- $mol_assert_like(await letters.get(1), undefined);
1908
- $mol_assert_like(await letters.count(), 1);
1909
- await letters.clear();
1910
- $mol_assert_like(await letters.count(), 0);
1911
- }
1912
- finally {
1913
- trans.abort();
1914
- db.kill();
1915
- }
1916
- },
1917
- async 'select by query'() {
1918
- const db = await $$.$mol_db('$mol_db_test', mig => mig.store_make('letters'));
1919
- const trans = db.change('letters');
1896
+ const named = new WeakSet();
1897
+ function $mol_func_name(func) {
1898
+ let name = func.name;
1899
+ if (name?.length > 1)
1900
+ return name;
1901
+ if (named.has(func))
1902
+ return name;
1903
+ for (let key in this) {
1920
1904
  try {
1921
- const { letters } = trans.stores;
1922
- await letters.put('a');
1923
- await letters.put('b');
1924
- await letters.put('c');
1925
- await letters.put('d');
1926
- $mol_assert_like(await letters.select(), ['a', 'b', 'c', 'd']);
1927
- $mol_assert_like(await letters.select(null, 2), ['a', 'b']);
1928
- $mol_assert_like(await letters.select($mol_dom_context.IDBKeyRange.bound(2, 3)), ['b', 'c']);
1929
- }
1930
- finally {
1931
- trans.abort();
1932
- db.kill();
1905
+ if (this[key] !== func)
1906
+ continue;
1907
+ name = key;
1908
+ Object.defineProperty(func, 'name', { value: name });
1909
+ break;
1933
1910
  }
1911
+ catch { }
1912
+ }
1913
+ named.add(func);
1914
+ return name;
1915
+ }
1916
+ $.$mol_func_name = $mol_func_name;
1917
+ function $mol_func_name_from(target, source) {
1918
+ Object.defineProperty(target, 'name', { value: source.name });
1919
+ return target;
1920
+ }
1921
+ $.$mol_func_name_from = $mol_func_name_from;
1922
+ })($ || ($ = {}));
1923
+ //mol/func/name/name.ts
1924
+ ;
1925
+ "use strict";
1926
+ var $;
1927
+ (function ($_1) {
1928
+ $mol_test({
1929
+ 'FQN of anon function'($) {
1930
+ const $$ = Object.assign($, { $mol_func_name_test: (() => () => { })() });
1931
+ $mol_assert_equal($$.$mol_func_name_test.name, '');
1932
+ $mol_assert_equal($$.$mol_func_name($$.$mol_func_name_test), '$mol_func_name_test');
1933
+ $mol_assert_equal($$.$mol_func_name_test.name, '$mol_func_name_test');
1934
1934
  },
1935
1935
  });
1936
1936
  })($ || ($ = {}));
1937
- //mol/db/store/store.test.ts
1937
+ //mol/func/name/name.test.ts
1938
1938
  ;
1939
1939
  "use strict";
1940
1940
  var $;