mol_regexp 0.0.259 → 0.0.263

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/web.test.js CHANGED
@@ -8,7 +8,7 @@ var $;
8
8
  }
9
9
  $.$mol_fail_hidden = $mol_fail_hidden;
10
10
  })($ || ($ = {}));
11
- //hidden.js.map
11
+ //mol/fail/hidden/hidden.ts
12
12
  ;
13
13
  "use strict";
14
14
  var $;
@@ -26,12 +26,18 @@ var $;
26
26
  $_1.$mol_test_all = [];
27
27
  async function $mol_test_run() {
28
28
  for (var test of $_1.$mol_test_all) {
29
- let context = Object.create($_1.$$);
29
+ let context = Object.create($$);
30
30
  for (let mock of $_1.$mol_test_mocks)
31
31
  await mock(context);
32
- await test(context);
32
+ const res = test(context);
33
+ if (res instanceof Promise) {
34
+ await new Promise((done, fail) => {
35
+ res.then(done, fail);
36
+ setTimeout(() => fail(new Error('Test timeout: ' + test.name)), 1000);
37
+ });
38
+ }
33
39
  }
34
- $_1.$$.$mol_log3_done({
40
+ $$.$mol_log3_done({
35
41
  place: '$mol_test',
36
42
  message: 'All tests passed',
37
43
  count: $_1.$mol_test_all.length,
@@ -49,7 +55,7 @@ var $;
49
55
  await $mol_test_run();
50
56
  }
51
57
  finally {
52
- $_1.$$.$mol_test_complete();
58
+ $$.$mol_test_complete();
53
59
  }
54
60
  }, 0);
55
61
  }
@@ -62,10 +68,10 @@ var $;
62
68
  for (let api of forbidden) {
63
69
  context[api] = new Proxy(function () { }, {
64
70
  get() {
65
- $_1.$mol_fail_hidden(new Error(`${api} is forbidden in tests`));
71
+ $mol_fail_hidden(new Error(`${api} is forbidden in tests`));
66
72
  },
67
73
  apply() {
68
- $_1.$mol_fail_hidden(new Error(`${api} is forbidden in tests`));
74
+ $mol_fail_hidden(new Error(`${api} is forbidden in tests`));
69
75
  },
70
76
  });
71
77
  }
@@ -93,7 +99,7 @@ var $;
93
99
  },
94
100
  });
95
101
  })($ || ($ = {}));
96
- //test.test.js.map
102
+ //mol/test/test.test.ts
97
103
  ;
98
104
  "use strict";
99
105
  var $;
@@ -102,20 +108,20 @@ var $;
102
108
  }
103
109
  $.$mol_test_complete = $mol_test_complete;
104
110
  })($ || ($ = {}));
105
- //test.web.test.js.map
111
+ //mol/test/test.web.test.ts
106
112
  ;
107
113
  "use strict";
108
114
  var $;
109
115
  (function ($) {
110
116
  })($ || ($ = {}));
111
- //context.js.map
117
+ //mol/dom/context/context.ts
112
118
  ;
113
119
  "use strict";
114
120
  var $;
115
121
  (function ($) {
116
122
  $.$mol_dom_context = self;
117
123
  })($ || ($ = {}));
118
- //context.web.js.map
124
+ //mol/dom/context/context.web.ts
119
125
  ;
120
126
  "use strict";
121
127
  var $;
@@ -126,7 +132,7 @@ var $;
126
132
  for (let view of childNodes) {
127
133
  if (view == null)
128
134
  continue;
129
- if (view instanceof $.$mol_dom_context.Node) {
135
+ if (view instanceof $mol_dom_context.Node) {
130
136
  while (true) {
131
137
  if (!nextNode) {
132
138
  el.appendChild(view);
@@ -157,7 +163,7 @@ var $;
157
163
  nextNode = nextNode.nextSibling;
158
164
  }
159
165
  else {
160
- const textNode = $.$mol_dom_context.document.createTextNode(String(view));
166
+ const textNode = $mol_dom_context.document.createTextNode(String(view));
161
167
  el.insertBefore(textNode, nextNode);
162
168
  }
163
169
  }
@@ -170,88 +176,88 @@ var $;
170
176
  }
171
177
  $.$mol_dom_render_children = $mol_dom_render_children;
172
178
  })($ || ($ = {}));
173
- //children.js.map
179
+ //mol/dom/render/children/children.ts
174
180
  ;
175
181
  "use strict";
176
- //error.js.map
182
+ //mol/type/error/error.ts
177
183
  ;
178
184
  "use strict";
179
- //assert.test.js.map
185
+ //mol/type/assert/assert.test.ts
180
186
  ;
181
187
  "use strict";
182
- //assert.js.map
188
+ //mol/type/assert/assert.ts
183
189
  ;
184
190
  "use strict";
185
- //deep.test.js.map
191
+ //mol/type/partial/deep/deep.test.ts
186
192
  ;
187
193
  "use strict";
188
- //deep.js.map
194
+ //mol/type/partial/deep/deep.ts
189
195
  ;
190
196
  "use strict";
191
197
  var $;
192
198
  (function ($) {
193
- $.$mol_test({
199
+ $mol_test({
194
200
  'Make empty div'() {
195
- $.$mol_assert_equal(($.$mol_jsx("div", null)).outerHTML, '<div></div>');
201
+ $mol_assert_equal(($mol_jsx("div", null)).outerHTML, '<div></div>');
196
202
  },
197
203
  'Define native field'() {
198
- const dom = $.$mol_jsx("input", { value: '123' });
199
- $.$mol_assert_equal(dom.outerHTML, '<input value="123">');
200
- $.$mol_assert_equal(dom.value, '123');
204
+ const dom = $mol_jsx("input", { value: '123' });
205
+ $mol_assert_equal(dom.outerHTML, '<input value="123">');
206
+ $mol_assert_equal(dom.value, '123');
201
207
  },
202
208
  'Define classes'() {
203
- const dom = $.$mol_jsx("div", { class: 'foo bar' });
204
- $.$mol_assert_equal(dom.outerHTML, '<div class="foo bar"></div>');
209
+ const dom = $mol_jsx("div", { class: 'foo bar' });
210
+ $mol_assert_equal(dom.outerHTML, '<div class="foo bar"></div>');
205
211
  },
206
212
  'Define styles'() {
207
- const dom = $.$mol_jsx("div", { style: { color: 'red' } });
208
- $.$mol_assert_equal(dom.outerHTML, '<div style="color: red;"></div>');
213
+ const dom = $mol_jsx("div", { style: { color: 'red' } });
214
+ $mol_assert_equal(dom.outerHTML, '<div style="color: red;"></div>');
209
215
  },
210
216
  'Define dataset'() {
211
- const dom = $.$mol_jsx("div", { dataset: { foo: 'bar' } });
212
- $.$mol_assert_equal(dom.outerHTML, '<div data-foo="bar"></div>');
217
+ const dom = $mol_jsx("div", { dataset: { foo: 'bar' } });
218
+ $mol_assert_equal(dom.outerHTML, '<div data-foo="bar"></div>');
213
219
  },
214
220
  'Define attributes'() {
215
- const dom = $.$mol_jsx("div", { lang: "ru", hidden: true });
216
- $.$mol_assert_equal(dom.outerHTML, '<div lang="ru" hidden=""></div>');
221
+ const dom = $mol_jsx("div", { lang: "ru", hidden: true });
222
+ $mol_assert_equal(dom.outerHTML, '<div lang="ru" hidden=""></div>');
217
223
  },
218
224
  'Define child nodes'() {
219
- const dom = $.$mol_jsx("div", null,
225
+ const dom = $mol_jsx("div", null,
220
226
  "hello",
221
- $.$mol_jsx("strong", null, "world"),
227
+ $mol_jsx("strong", null, "world"),
222
228
  "!");
223
- $.$mol_assert_equal(dom.outerHTML, '<div>hello<strong>world</strong>!</div>');
229
+ $mol_assert_equal(dom.outerHTML, '<div>hello<strong>world</strong>!</div>');
224
230
  },
225
231
  'Function as component'() {
226
232
  const Button = ({ hint }, target) => {
227
- return $.$mol_jsx("button", { title: hint }, target());
233
+ return $mol_jsx("button", { title: hint }, target());
228
234
  };
229
- const dom = $.$mol_jsx(Button, { id: "/foo", hint: "click me" }, () => 'hey!');
230
- $.$mol_assert_equal(dom.outerHTML, '<button title="click me" id="/foo">hey!</button>');
235
+ const dom = $mol_jsx(Button, { id: "/foo", hint: "click me" }, () => 'hey!');
236
+ $mol_assert_equal(dom.outerHTML, '<button title="click me" id="/foo">hey!</button>');
231
237
  },
232
238
  'Nested guid generation'() {
233
239
  const Foo = () => {
234
- return $.$mol_jsx("div", null,
235
- $.$mol_jsx(Bar, { id: "/bar" },
236
- $.$mol_jsx("img", { id: "/icon" })));
240
+ return $mol_jsx("div", null,
241
+ $mol_jsx(Bar, { id: "/bar" },
242
+ $mol_jsx("img", { id: "/icon" })));
237
243
  };
238
244
  const Bar = (props, icon) => {
239
- return $.$mol_jsx("span", null, icon);
245
+ return $mol_jsx("span", null, icon);
240
246
  };
241
- const dom = $.$mol_jsx(Foo, { id: "/foo" });
242
- $.$mol_assert_equal(dom.outerHTML, '<div id="/foo"><span id="/foo/bar"><img id="/foo/icon"></span></div>');
247
+ const dom = $mol_jsx(Foo, { id: "/foo" });
248
+ $mol_assert_equal(dom.outerHTML, '<div id="/foo"><span id="/foo/bar"><img id="/foo/icon"></span></div>');
243
249
  },
244
250
  'Fail on non unique ids'() {
245
251
  const App = () => {
246
- return $.$mol_jsx("div", null,
247
- $.$mol_jsx("span", { id: "/bar" }),
248
- $.$mol_jsx("span", { id: "/bar" }));
252
+ return $mol_jsx("div", null,
253
+ $mol_jsx("span", { id: "/bar" }),
254
+ $mol_jsx("span", { id: "/bar" }));
249
255
  };
250
- $.$mol_assert_fail(() => $.$mol_jsx(App, { id: "/foo" }), 'JSX already has tag with id "/bar"');
256
+ $mol_assert_fail(() => $mol_jsx(App, { id: "/foo" }), 'JSX already has tag with id "/bar"');
251
257
  },
252
258
  });
253
259
  })($ || ($ = {}));
254
- //jsx.test.js.map
260
+ //mol/jsx/jsx.test.tsx
255
261
  ;
256
262
  "use strict";
257
263
  var $;
@@ -260,15 +266,15 @@ var $;
260
266
  $.$mol_jsx_booked = null;
261
267
  $.$mol_jsx_document = {
262
268
  getElementById: () => null,
263
- createElementNS: (space, name) => $.$mol_dom_context.document.createElementNS(space, name),
264
- createDocumentFragment: () => $.$mol_dom_context.document.createDocumentFragment(),
269
+ createElementNS: (space, name) => $mol_dom_context.document.createElementNS(space, name),
270
+ createDocumentFragment: () => $mol_dom_context.document.createDocumentFragment(),
265
271
  };
266
272
  $.$mol_jsx_frag = '';
267
273
  function $mol_jsx(Elem, props, ...childNodes) {
268
274
  const id = props && props.id || '';
269
275
  if (Elem && $.$mol_jsx_booked) {
270
276
  if ($.$mol_jsx_booked.has(id)) {
271
- $.$mol_fail(new Error(`JSX already has tag with id ${JSON.stringify(id)}`));
277
+ $mol_fail(new Error(`JSX already has tag with id ${JSON.stringify(id)}`));
272
278
  }
273
279
  else {
274
280
  $.$mol_jsx_booked.add(id);
@@ -307,7 +313,7 @@ var $;
307
313
  ? $.$mol_jsx_document.createElementNS(props?.xmlns ?? 'http://www.w3.org/1999/xhtml', Elem)
308
314
  : $.$mol_jsx_document.createDocumentFragment();
309
315
  }
310
- $.$mol_dom_render_children(node, [].concat(...childNodes));
316
+ $mol_dom_render_children(node, [].concat(...childNodes));
311
317
  if (!Elem)
312
318
  return node;
313
319
  for (const key in props) {
@@ -333,77 +339,77 @@ var $;
333
339
  }
334
340
  $.$mol_jsx = $mol_jsx;
335
341
  })($ || ($ = {}));
336
- //jsx.js.map
342
+ //mol/jsx/jsx.ts
337
343
  ;
338
344
  "use strict";
339
345
  var $;
340
346
  (function ($) {
341
- $.$mol_test({
347
+ $mol_test({
342
348
  'nulls & undefineds'() {
343
- $.$mol_assert_ok($.$mol_compare_deep(null, null));
344
- $.$mol_assert_ok($.$mol_compare_deep(undefined, undefined));
345
- $.$mol_assert_not($.$mol_compare_deep(undefined, null));
346
- $.$mol_assert_not($.$mol_compare_deep({}, null));
349
+ $mol_assert_ok($mol_compare_deep(null, null));
350
+ $mol_assert_ok($mol_compare_deep(undefined, undefined));
351
+ $mol_assert_not($mol_compare_deep(undefined, null));
352
+ $mol_assert_not($mol_compare_deep({}, null));
347
353
  },
348
354
  'number'() {
349
- $.$mol_assert_ok($.$mol_compare_deep(1, 1));
350
- $.$mol_assert_ok($.$mol_compare_deep(Number.NaN, Number.NaN));
351
- $.$mol_assert_not($.$mol_compare_deep(1, 2));
352
- $.$mol_assert_ok($.$mol_compare_deep(Object(1), Object(1)));
353
- $.$mol_assert_not($.$mol_compare_deep(Object(1), Object(2)));
355
+ $mol_assert_ok($mol_compare_deep(1, 1));
356
+ $mol_assert_ok($mol_compare_deep(Number.NaN, Number.NaN));
357
+ $mol_assert_not($mol_compare_deep(1, 2));
358
+ $mol_assert_ok($mol_compare_deep(Object(1), Object(1)));
359
+ $mol_assert_not($mol_compare_deep(Object(1), Object(2)));
354
360
  },
355
361
  'POJO'() {
356
- $.$mol_assert_ok($.$mol_compare_deep({}, {}));
357
- $.$mol_assert_not($.$mol_compare_deep({ a: 1 }, { b: 2 }));
358
- $.$mol_assert_not($.$mol_compare_deep({ a: 1 }, { a: 2 }));
359
- $.$mol_assert_not($.$mol_compare_deep({}, { a: undefined }));
360
- $.$mol_assert_ok($.$mol_compare_deep({ a: 1, b: 2 }, { b: 2, a: 1 }));
361
- $.$mol_assert_ok($.$mol_compare_deep({ a: { b: 1 } }, { a: { b: 1 } }));
362
+ $mol_assert_ok($mol_compare_deep({}, {}));
363
+ $mol_assert_not($mol_compare_deep({ a: 1 }, { b: 2 }));
364
+ $mol_assert_not($mol_compare_deep({ a: 1 }, { a: 2 }));
365
+ $mol_assert_not($mol_compare_deep({}, { a: undefined }));
366
+ $mol_assert_ok($mol_compare_deep({ a: 1, b: 2 }, { b: 2, a: 1 }));
367
+ $mol_assert_ok($mol_compare_deep({ a: { b: 1 } }, { a: { b: 1 } }));
362
368
  },
363
369
  'Array'() {
364
- $.$mol_assert_ok($.$mol_compare_deep([], []));
365
- $.$mol_assert_ok($.$mol_compare_deep([1, [2]], [1, [2]]));
366
- $.$mol_assert_not($.$mol_compare_deep([1, 2], [1, 3]));
367
- $.$mol_assert_not($.$mol_compare_deep([1, 2,], [1, 3, undefined]));
370
+ $mol_assert_ok($mol_compare_deep([], []));
371
+ $mol_assert_ok($mol_compare_deep([1, [2]], [1, [2]]));
372
+ $mol_assert_not($mol_compare_deep([1, 2], [1, 3]));
373
+ $mol_assert_not($mol_compare_deep([1, 2,], [1, 3, undefined]));
368
374
  },
369
375
  'Non POJO are different'() {
370
376
  class Thing extends Object {
371
377
  }
372
- $.$mol_assert_not($.$mol_compare_deep(new Thing, new Thing));
373
- $.$mol_assert_not($.$mol_compare_deep(() => 1, () => 1));
374
- $.$mol_assert_not($.$mol_compare_deep(new RangeError('Test error'), new RangeError('Test error')));
378
+ $mol_assert_not($mol_compare_deep(new Thing, new Thing));
379
+ $mol_assert_not($mol_compare_deep(() => 1, () => 1));
380
+ $mol_assert_not($mol_compare_deep(new RangeError('Test error'), new RangeError('Test error')));
375
381
  },
376
382
  'same POJOs with cyclic reference'() {
377
383
  const a = { foo: {} };
378
384
  a['self'] = a;
379
385
  const b = { foo: {} };
380
386
  b['self'] = b;
381
- $.$mol_assert_ok($.$mol_compare_deep(a, b));
387
+ $mol_assert_ok($mol_compare_deep(a, b));
382
388
  },
383
389
  'Date'() {
384
- $.$mol_assert_ok($.$mol_compare_deep(new Date(12345), new Date(12345)));
385
- $.$mol_assert_not($.$mol_compare_deep(new Date(12345), new Date(12346)));
390
+ $mol_assert_ok($mol_compare_deep(new Date(12345), new Date(12345)));
391
+ $mol_assert_not($mol_compare_deep(new Date(12345), new Date(12346)));
386
392
  },
387
393
  'RegExp'() {
388
- $.$mol_assert_ok($.$mol_compare_deep(/\x22/mig, /\x22/mig));
389
- $.$mol_assert_not($.$mol_compare_deep(/\x22/mig, /\x21/mig));
390
- $.$mol_assert_not($.$mol_compare_deep(/\x22/mig, /\x22/mg));
394
+ $mol_assert_ok($mol_compare_deep(/\x22/mig, /\x22/mig));
395
+ $mol_assert_not($mol_compare_deep(/\x22/mig, /\x21/mig));
396
+ $mol_assert_not($mol_compare_deep(/\x22/mig, /\x22/mg));
391
397
  },
392
398
  'Map'() {
393
- $.$mol_assert_ok($.$mol_compare_deep(new Map, new Map));
394
- $.$mol_assert_ok($.$mol_compare_deep(new Map([[1, [2]]]), new Map([[1, [2]]])));
395
- $.$mol_assert_not($.$mol_compare_deep(new Map([[1, 2]]), new Map([[1, 3]])));
396
- $.$mol_assert_not($.$mol_compare_deep(new Map([[[1], 2]]), new Map([[[1], 2]])));
399
+ $mol_assert_ok($mol_compare_deep(new Map, new Map));
400
+ $mol_assert_ok($mol_compare_deep(new Map([[1, [2]]]), new Map([[1, [2]]])));
401
+ $mol_assert_not($mol_compare_deep(new Map([[1, 2]]), new Map([[1, 3]])));
402
+ $mol_assert_not($mol_compare_deep(new Map([[[1], 2]]), new Map([[[1], 2]])));
397
403
  },
398
404
  'Set'() {
399
- $.$mol_assert_ok($.$mol_compare_deep(new Set, new Set));
400
- $.$mol_assert_ok($.$mol_compare_deep(new Set([1, [2]]), new Set([1, [2]])));
401
- $.$mol_assert_not($.$mol_compare_deep(new Set([1]), new Set([2])));
405
+ $mol_assert_ok($mol_compare_deep(new Set, new Set));
406
+ $mol_assert_ok($mol_compare_deep(new Set([1, [2]]), new Set([1, [2]])));
407
+ $mol_assert_not($mol_compare_deep(new Set([1]), new Set([2])));
402
408
  },
403
409
  'Uint8Array'() {
404
- $.$mol_assert_ok($.$mol_compare_deep(new Uint8Array, new Uint8Array));
405
- $.$mol_assert_ok($.$mol_compare_deep(new Uint8Array([0]), new Uint8Array([0])));
406
- $.$mol_assert_not($.$mol_compare_deep(new Uint8Array([0]), new Uint8Array([1])));
410
+ $mol_assert_ok($mol_compare_deep(new Uint8Array, new Uint8Array));
411
+ $mol_assert_ok($mol_compare_deep(new Uint8Array([0]), new Uint8Array([0])));
412
+ $mol_assert_not($mol_compare_deep(new Uint8Array([0]), new Uint8Array([1])));
407
413
  },
408
414
  'Custom comparator'() {
409
415
  class User {
@@ -417,17 +423,17 @@ var $;
417
423
  return this.name;
418
424
  }
419
425
  }
420
- $.$mol_assert_ok($.$mol_compare_deep(new User('Jin'), new User('Jin')));
421
- $.$mol_assert_not($.$mol_compare_deep(new User('Jin'), new User('John')));
426
+ $mol_assert_ok($mol_compare_deep(new User('Jin'), new User('Jin')));
427
+ $mol_assert_not($mol_compare_deep(new User('Jin'), new User('John')));
422
428
  },
423
429
  });
424
430
  })($ || ($ = {}));
425
- //deep.test.js.map
431
+ //mol/compare/deep/deep.test.tsx
426
432
  ;
427
433
  "use strict";
428
434
  var $;
429
435
  (function ($) {
430
- let cache = new WeakMap();
436
+ $.$mol_compare_deep_cache = new WeakMap();
431
437
  function $mol_compare_deep(left, right) {
432
438
  if (Object.is(left, right))
433
439
  return true;
@@ -453,7 +459,7 @@ var $;
453
459
  return Object.is(left.valueOf(), right['valueOf']());
454
460
  if (left instanceof RegExp)
455
461
  return left.source === right['source'] && left.flags === right['flags'];
456
- let left_cache = cache.get(left);
462
+ let left_cache = $.$mol_compare_deep_cache.get(left);
457
463
  if (left_cache) {
458
464
  const right_cache = left_cache.get(right);
459
465
  if (typeof right_cache === 'boolean')
@@ -461,7 +467,7 @@ var $;
461
467
  }
462
468
  else {
463
469
  left_cache = new WeakMap([[right, true]]);
464
- cache.set(left, left_cache);
470
+ $.$mol_compare_deep_cache.set(left, left_cache);
465
471
  }
466
472
  let result;
467
473
  try {
@@ -545,50 +551,50 @@ var $;
545
551
  return Object.is(left[Symbol.toPrimitive]('default'), right[Symbol.toPrimitive]('default'));
546
552
  }
547
553
  })($ || ($ = {}));
548
- //deep.js.map
554
+ //mol/compare/deep/deep.ts
549
555
  ;
550
556
  "use strict";
551
557
  var $;
552
558
  (function ($) {
553
559
  function $mol_dom_serialize(node) {
554
- const serializer = new $.$mol_dom_context.XMLSerializer;
560
+ const serializer = new $mol_dom_context.XMLSerializer;
555
561
  return serializer.serializeToString(node);
556
562
  }
557
563
  $.$mol_dom_serialize = $mol_dom_serialize;
558
564
  })($ || ($ = {}));
559
- //serialize.js.map
565
+ //mol/dom/serialize/serialize.ts
560
566
  ;
561
567
  "use strict";
562
568
  var $;
563
569
  (function ($) {
564
- $.$mol_test({
570
+ $mol_test({
565
571
  'must be false'() {
566
- $.$mol_assert_not(0);
572
+ $mol_assert_not(0);
567
573
  },
568
574
  'must be true'() {
569
- $.$mol_assert_ok(1);
575
+ $mol_assert_ok(1);
570
576
  },
571
577
  'two must be equal'() {
572
- $.$mol_assert_equal(2, 2);
578
+ $mol_assert_equal(2, 2);
573
579
  },
574
580
  'three must be equal'() {
575
- $.$mol_assert_equal(2, 2, 2);
581
+ $mol_assert_equal(2, 2, 2);
576
582
  },
577
583
  'two must be unique'() {
578
- $.$mol_assert_unique([3], [3]);
584
+ $mol_assert_unique([3], [3]);
579
585
  },
580
586
  'three must be unique'() {
581
- $.$mol_assert_unique([3], [3], [3]);
587
+ $mol_assert_unique([3], [3], [3]);
582
588
  },
583
589
  'two must be alike'() {
584
- $.$mol_assert_like([3], [3]);
590
+ $mol_assert_like([3], [3]);
585
591
  },
586
592
  'three must be alike'() {
587
- $.$mol_assert_like([3], [3], [3]);
593
+ $mol_assert_like([3], [3], [3]);
588
594
  },
589
595
  });
590
596
  })($ || ($ = {}));
591
- //assert.test.js.map
597
+ //mol/assert/assert.test.ts
592
598
  ;
593
599
  "use strict";
594
600
  var $;
@@ -596,13 +602,13 @@ var $;
596
602
  function $mol_assert_ok(value) {
597
603
  if (value)
598
604
  return;
599
- $.$mol_fail(new Error(`${value} ≠ true`));
605
+ $mol_fail(new Error(`${value} ≠ true`));
600
606
  }
601
607
  $.$mol_assert_ok = $mol_assert_ok;
602
608
  function $mol_assert_not(value) {
603
609
  if (!value)
604
610
  return;
605
- $.$mol_fail(new Error(`${value} ≠ false`));
611
+ $mol_fail(new Error(`${value} ≠ false`));
606
612
  }
607
613
  $.$mol_assert_not = $mol_assert_not;
608
614
  function $mol_assert_fail(handler, ErrorRight) {
@@ -626,7 +632,7 @@ var $;
626
632
  finally {
627
633
  $.$mol_fail = fail;
628
634
  }
629
- $.$mol_fail(new Error('Not failed'));
635
+ $mol_fail(new Error('Not failed'));
630
636
  }
631
637
  $.$mol_assert_fail = $mol_assert_fail;
632
638
  function $mol_assert_equal(...args) {
@@ -637,7 +643,7 @@ var $;
637
643
  if (Number.isNaN(args[i]) && Number.isNaN(args[j]))
638
644
  continue;
639
645
  if (args[i] !== args[j])
640
- $.$mol_fail(new Error(`Not equal (${i + 1}:${j + 1})\n${args[i]}\n${args[j]}`));
646
+ $mol_fail(new Error(`Not equal (${i + 1}:${j + 1})\n${args[i]}\n${args[j]}`));
641
647
  }
642
648
  }
643
649
  }
@@ -648,7 +654,7 @@ var $;
648
654
  if (i === j)
649
655
  continue;
650
656
  if (args[i] === args[j] || (Number.isNaN(args[i]) && Number.isNaN(args[j]))) {
651
- $.$mol_fail(new Error(`args[${i}] = args[${j}] = ${args[i]}`));
657
+ $mol_fail(new Error(`args[${i}] = args[${j}] = ${args[i]}`));
652
658
  }
653
659
  }
654
660
  }
@@ -656,7 +662,7 @@ var $;
656
662
  $.$mol_assert_unique = $mol_assert_unique;
657
663
  function $mol_assert_like(head, ...tail) {
658
664
  for (let [index, value] of Object.entries(tail)) {
659
- if (!$.$mol_compare_deep(value, head)) {
665
+ if (!$mol_compare_deep(value, head)) {
660
666
  const print = (val) => {
661
667
  if (!val)
662
668
  return val;
@@ -672,128 +678,128 @@ var $;
672
678
  return val;
673
679
  }
674
680
  };
675
- return $.$mol_fail(new Error(`Not like (1:${+index + 2})\n${print(head)}\n---\n${print(value)}`));
681
+ return $mol_fail(new Error(`Not like (1:${+index + 2})\n${print(head)}\n---\n${print(value)}`));
676
682
  }
677
683
  }
678
684
  }
679
685
  $.$mol_assert_like = $mol_assert_like;
680
686
  function $mol_assert_dom(left, right) {
681
- $mol_assert_equal($.$mol_dom_serialize(left), $.$mol_dom_serialize(right));
687
+ $mol_assert_equal($mol_dom_serialize(left), $mol_dom_serialize(right));
682
688
  }
683
689
  $.$mol_assert_dom = $mol_assert_dom;
684
690
  })($ || ($ = {}));
685
- //assert.js.map
691
+ //mol/assert/assert.ts
686
692
  ;
687
693
  "use strict";
688
- //equals.test.js.map
694
+ //mol/type/equals/equals.test.ts
689
695
  ;
690
696
  "use strict";
691
- //merge.test.js.map
697
+ //mol/type/merge/merge.test.ts
692
698
  ;
693
699
  "use strict";
694
- //intersect.test.js.map
700
+ //mol/type/intersect/intersect.test.ts
695
701
  ;
696
702
  "use strict";
697
703
  var $;
698
704
  (function ($) {
699
- $.$mol_test({
705
+ $mol_test({
700
706
  'escape'() {
701
- const specials = $.$mol_regexp.from('.*+?^${}()|[]\\');
702
- $.$mol_assert_equal(specials.source, '\\.\\*\\+\\?\\^\\$\\{\\}\\(\\)\\|\\[\\]\\\\');
707
+ const specials = $mol_regexp.from('.*+?^${}()|[]\\');
708
+ $mol_assert_equal(specials.source, '\\.\\*\\+\\?\\^\\$\\{\\}\\(\\)\\|\\[\\]\\\\');
703
709
  },
704
710
  'char code'() {
705
- const space = $.$mol_regexp.from(32);
706
- $.$mol_assert_like(' '.match(space), [' ']);
711
+ const space = $mol_regexp.from(32);
712
+ $mol_assert_like(' '.match(space), [' ']);
707
713
  },
708
714
  'repeat fixed'() {
709
- const { repeat, decimal_only: digit } = $.$mol_regexp;
715
+ const { repeat, decimal_only: digit } = $mol_regexp;
710
716
  const year = repeat(digit, 4, 4);
711
- $.$mol_assert_like('#2020#'.match(year), ['2020']);
717
+ $mol_assert_like('#2020#'.match(year), ['2020']);
712
718
  },
713
719
  'greedy repeat'() {
714
- const { repeat, repeat_greedy, latin_only: letter } = $.$mol_regexp;
715
- $.$mol_assert_like('abc'.match(repeat(letter, 1, 2)), ['a', 'b', 'c']);
716
- $.$mol_assert_like('abc'.match(repeat_greedy(letter, 1, 2)), ['ab', 'c']);
720
+ const { repeat, repeat_greedy, latin_only: letter } = $mol_regexp;
721
+ $mol_assert_like('abc'.match(repeat(letter, 1, 2)), ['a', 'b', 'c']);
722
+ $mol_assert_like('abc'.match(repeat_greedy(letter, 1, 2)), ['ab', 'c']);
717
723
  },
718
724
  'repeat range'() {
719
- const { repeat_greedy, decimal_only: digit } = $.$mol_regexp;
725
+ const { repeat_greedy, decimal_only: digit } = $mol_regexp;
720
726
  const year = repeat_greedy(digit, 2, 4);
721
- $.$mol_assert_like('#2#'.match(year), null);
722
- $.$mol_assert_like('#20#'.match(year), ['20']);
723
- $.$mol_assert_like('#2020#'.match(year), ['2020']);
724
- $.$mol_assert_like('#20201#'.match(year), ['2020']);
727
+ $mol_assert_like('#2#'.match(year), null);
728
+ $mol_assert_like('#20#'.match(year), ['20']);
729
+ $mol_assert_like('#2020#'.match(year), ['2020']);
730
+ $mol_assert_like('#20201#'.match(year), ['2020']);
725
731
  },
726
732
  'repeat from'() {
727
- const { repeat_greedy, latin_only: letter } = $.$mol_regexp;
733
+ const { repeat_greedy, latin_only: letter } = $mol_regexp;
728
734
  const name = repeat_greedy(letter, 2);
729
- $.$mol_assert_like('##'.match(name), null);
730
- $.$mol_assert_like('#a#'.match(name), null);
731
- $.$mol_assert_like('#ab#'.match(name), ['ab']);
732
- $.$mol_assert_like('#abc#'.match(name), ['abc']);
735
+ $mol_assert_like('##'.match(name), null);
736
+ $mol_assert_like('#a#'.match(name), null);
737
+ $mol_assert_like('#ab#'.match(name), ['ab']);
738
+ $mol_assert_like('#abc#'.match(name), ['abc']);
733
739
  },
734
740
  'from string'() {
735
- const regexp = $.$mol_regexp.from('[\\d]');
736
- $.$mol_assert_equal(regexp.source, '\\[\\\\d\\]');
737
- $.$mol_assert_equal(regexp.flags, 'gsu');
741
+ const regexp = $mol_regexp.from('[\\d]');
742
+ $mol_assert_equal(regexp.source, '\\[\\\\d\\]');
743
+ $mol_assert_equal(regexp.flags, 'gsu');
738
744
  },
739
745
  'from regexp'() {
740
- const regexp = $.$mol_regexp.from(/[\d]/i);
741
- $.$mol_assert_equal(regexp.source, '[\\d]');
742
- $.$mol_assert_equal(regexp.flags, 'i');
746
+ const regexp = $mol_regexp.from(/[\d]/i);
747
+ $mol_assert_equal(regexp.source, '[\\d]');
748
+ $mol_assert_equal(regexp.flags, 'i');
743
749
  },
744
750
  'split'() {
745
- const regexp = $.$mol_regexp.from(';');
746
- $.$mol_assert_like('aaa;bbb;ccc'.split(regexp), ['aaa', ';', 'bbb', ';', 'ccc']);
747
- $.$mol_assert_like('aaa;;ccc'.split(regexp), ['aaa', ';', '', ';', 'ccc']);
748
- $.$mol_assert_like('aaa'.split(regexp), ['aaa']);
749
- $.$mol_assert_like(''.split(regexp), ['']);
751
+ const regexp = $mol_regexp.from(';');
752
+ $mol_assert_like('aaa;bbb;ccc'.split(regexp), ['aaa', ';', 'bbb', ';', 'ccc']);
753
+ $mol_assert_like('aaa;;ccc'.split(regexp), ['aaa', ';', '', ';', 'ccc']);
754
+ $mol_assert_like('aaa'.split(regexp), ['aaa']);
755
+ $mol_assert_like(''.split(regexp), ['']);
750
756
  },
751
757
  'test for matching'() {
752
- const regexp = $.$mol_regexp.from('foo');
753
- $.$mol_assert_like(regexp.test(''), false);
754
- $.$mol_assert_like(regexp.test('fo'), false);
755
- $.$mol_assert_like(regexp.test('foo'), true);
756
- $.$mol_assert_like(regexp.test('foobar'), true);
757
- $.$mol_assert_like(regexp.test('barfoo'), true);
758
+ const regexp = $mol_regexp.from('foo');
759
+ $mol_assert_like(regexp.test(''), false);
760
+ $mol_assert_like(regexp.test('fo'), false);
761
+ $mol_assert_like(regexp.test('foo'), true);
762
+ $mol_assert_like(regexp.test('foobar'), true);
763
+ $mol_assert_like(regexp.test('barfoo'), true);
758
764
  },
759
765
  'case ignoring'() {
760
- const xxx = $.$mol_regexp.from('x', { ignoreCase: true });
761
- $.$mol_assert_like(xxx.flags, 'gisu');
762
- $.$mol_assert_like(xxx.exec('xx')[0], 'x');
763
- $.$mol_assert_like(xxx.exec('XX')[0], 'X');
766
+ const xxx = $mol_regexp.from('x', { ignoreCase: true });
767
+ $mol_assert_like(xxx.flags, 'gisu');
768
+ $mol_assert_like(xxx.exec('xx')[0], 'x');
769
+ $mol_assert_like(xxx.exec('XX')[0], 'X');
764
770
  },
765
771
  'multiline mode'() {
766
- const { end, from } = $.$mol_regexp;
772
+ const { end, from } = $mol_regexp;
767
773
  const xxx = from(['x', end], { multiline: true });
768
- $.$mol_assert_like(xxx.exec('x\ny')[0], 'x');
769
- $.$mol_assert_like(xxx.flags, 'gmsu');
774
+ $mol_assert_like(xxx.exec('x\ny')[0], 'x');
775
+ $mol_assert_like(xxx.flags, 'gmsu');
770
776
  },
771
777
  'flags override'() {
772
- const triplet = $.$mol_regexp.from($.$mol_regexp.from(/.../, { ignoreCase: true }), { multiline: true });
773
- $.$mol_assert_like(triplet.toString(), '/.../gmsu');
778
+ const triplet = $mol_regexp.from($mol_regexp.from(/.../, { ignoreCase: true }), { multiline: true });
779
+ $mol_assert_like(triplet.toString(), '/.../gmsu');
774
780
  },
775
781
  'sequence'() {
776
- const { begin, end, decimal_only: digit, repeat, from } = $.$mol_regexp;
782
+ const { begin, end, decimal_only: digit, repeat, from } = $mol_regexp;
777
783
  const year = repeat(digit, 4, 4);
778
784
  const dash = '-';
779
785
  const month = repeat(digit, 2, 2);
780
786
  const day = repeat(digit, 2, 2);
781
787
  const date = from([begin, year, dash, month, dash, day, end]);
782
- $.$mol_assert_like(date.exec('2020-01-02')[0], '2020-01-02');
788
+ $mol_assert_like(date.exec('2020-01-02')[0], '2020-01-02');
783
789
  },
784
790
  'optional'() {
785
- const name = $.$mol_regexp.from(['A', ['4']]);
786
- $.$mol_assert_equal('AB'.match(name)[0], 'A');
787
- $.$mol_assert_equal('A4'.match(name)[0], 'A4');
791
+ const name = $mol_regexp.from(['A', ['4']]);
792
+ $mol_assert_equal('AB'.match(name)[0], 'A');
793
+ $mol_assert_equal('A4'.match(name)[0], 'A4');
788
794
  },
789
795
  'only groups'() {
790
- const regexp = $.$mol_regexp.from({ dog: '@' });
791
- $.$mol_assert_like([...'#'.matchAll(regexp)][0].groups, undefined);
792
- $.$mol_assert_like([...'@'.matchAll(regexp)][0].groups, { dog: '@' });
796
+ const regexp = $mol_regexp.from({ dog: '@' });
797
+ $mol_assert_like([...'#'.matchAll(regexp)][0].groups, undefined);
798
+ $mol_assert_like([...'@'.matchAll(regexp)][0].groups, { dog: '@' });
793
799
  },
794
800
  'catch skipped'() {
795
- const regexp = $.$mol_regexp.from(/(@)(\d?)/g);
796
- $.$mol_assert_like([...'[[@]]'.matchAll(regexp)].map(f => [...f]), [
801
+ const regexp = $mol_regexp.from(/(@)(\d?)/g);
802
+ $mol_assert_like([...'[[@]]'.matchAll(regexp)].map(f => [...f]), [
797
803
  ['[['],
798
804
  ['@', '@', ''],
799
805
  [']]'],
@@ -805,11 +811,11 @@ var $;
805
811
  Sex["male"] = "male";
806
812
  Sex["female"] = "female";
807
813
  })(Sex || (Sex = {}));
808
- const sexism = $.$mol_regexp.from(Sex);
809
- $.$mol_assert_like([...''.matchAll(sexism)].length, 0);
810
- $.$mol_assert_like([...'trans'.matchAll(sexism)][0].groups, undefined);
811
- $.$mol_assert_like([...'male'.matchAll(sexism)][0].groups, { male: 'male', female: '' });
812
- $.$mol_assert_like([...'female'.matchAll(sexism)][0].groups, { male: '', female: 'female' });
814
+ const sexism = $mol_regexp.from(Sex);
815
+ $mol_assert_like([...''.matchAll(sexism)].length, 0);
816
+ $mol_assert_like([...'trans'.matchAll(sexism)][0].groups, undefined);
817
+ $mol_assert_like([...'male'.matchAll(sexism)][0].groups, { male: 'male', female: '' });
818
+ $mol_assert_like([...'female'.matchAll(sexism)][0].groups, { male: '', female: 'female' });
813
819
  },
814
820
  'recursive only groups'() {
815
821
  let Sex;
@@ -817,20 +823,20 @@ var $;
817
823
  Sex["male"] = "male";
818
824
  Sex["female"] = "female";
819
825
  })(Sex || (Sex = {}));
820
- const sexism = $.$mol_regexp.from({ Sex });
821
- $.$mol_assert_like([...''.matchAll(sexism)].length, 0);
822
- $.$mol_assert_like([...'male'.matchAll(sexism)][0].groups, { Sex: 'male', male: 'male', female: '' });
823
- $.$mol_assert_like([...'female'.matchAll(sexism)][0].groups, { Sex: 'female', male: '', female: 'female' });
826
+ const sexism = $mol_regexp.from({ Sex });
827
+ $mol_assert_like([...''.matchAll(sexism)].length, 0);
828
+ $mol_assert_like([...'male'.matchAll(sexism)][0].groups, { Sex: 'male', male: 'male', female: '' });
829
+ $mol_assert_like([...'female'.matchAll(sexism)][0].groups, { Sex: 'female', male: '', female: 'female' });
824
830
  },
825
831
  'sequence with groups'() {
826
- const { begin, end, decimal_only: digit, repeat, from } = $.$mol_regexp;
832
+ const { begin, end, decimal_only: digit, repeat, from } = $mol_regexp;
827
833
  const year = repeat(digit, 4, 4);
828
834
  const dash = '-';
829
835
  const month = repeat(digit, 2, 2);
830
836
  const day = repeat(digit, 2, 2);
831
837
  const regexp = from([begin, { year }, dash, { month }, dash, { day }, end]);
832
838
  const found = [...'2020-01-02'.matchAll(regexp)];
833
- $.$mol_assert_like(found[0].groups, {
839
+ $mol_assert_like(found[0].groups, {
834
840
  year: '2020',
835
841
  month: '01',
836
842
  day: '02',
@@ -839,8 +845,8 @@ var $;
839
845
  'sequence with groups of mixed type'() {
840
846
  const prefix = '/';
841
847
  const postfix = '/';
842
- const regexp = $.$mol_regexp.from([{ prefix }, /(\w+)/, { postfix }, /([gumi]*)/]);
843
- $.$mol_assert_like([...'/foo/mi'.matchAll(regexp)], [
848
+ const regexp = $mol_regexp.from([{ prefix }, /(\w+)/, { postfix }, /([gumi]*)/]);
849
+ $mol_assert_like([...'/foo/mi'.matchAll(regexp)], [
844
850
  Object.assign(["/foo/mi", "/", "foo", "/", "mi"], {
845
851
  groups: {
846
852
  prefix: '/',
@@ -852,7 +858,7 @@ var $;
852
858
  ]);
853
859
  },
854
860
  'recursive sequence with groups'() {
855
- const { begin, end, decimal_only: digit, repeat, from } = $.$mol_regexp;
861
+ const { begin, end, decimal_only: digit, repeat, from } = $mol_regexp;
856
862
  const year = repeat(digit, 4, 4);
857
863
  const dash = '-';
858
864
  const month = repeat(digit, 2, 2);
@@ -861,7 +867,7 @@ var $;
861
867
  begin, { date: [{ year }, dash, { month }] }, dash, { day }, end
862
868
  ]);
863
869
  const found = [...'2020-01-02'.matchAll(regexp)];
864
- $.$mol_assert_like(found[0].groups, {
870
+ $mol_assert_like(found[0].groups, {
865
871
  date: '2020-01',
866
872
  year: '2020',
867
873
  month: '01',
@@ -869,70 +875,70 @@ var $;
869
875
  });
870
876
  },
871
877
  'parse multiple'() {
872
- const { decimal_only: digit, from } = $.$mol_regexp;
878
+ const { decimal_only: digit, from } = $mol_regexp;
873
879
  const regexp = from({ digit });
874
- $.$mol_assert_like([...'123'.matchAll(regexp)].map(f => f.groups), [
880
+ $mol_assert_like([...'123'.matchAll(regexp)].map(f => f.groups), [
875
881
  { digit: '1' },
876
882
  { digit: '2' },
877
883
  { digit: '3' },
878
884
  ]);
879
885
  },
880
886
  'variants'() {
881
- const { begin, or, end, from } = $.$mol_regexp;
887
+ const { begin, or, end, from } = $mol_regexp;
882
888
  const sexism = from([
883
889
  begin, 'sex = ', { sex: ['male', or, 'female'] }, end
884
890
  ]);
885
- $.$mol_assert_like([...'sex = male'.matchAll(sexism)][0].groups, { sex: 'male' });
886
- $.$mol_assert_like([...'sex = female'.matchAll(sexism)][0].groups, { sex: 'female' });
887
- $.$mol_assert_like([...'sex = malefemale'.matchAll(sexism)][0].groups, undefined);
891
+ $mol_assert_like([...'sex = male'.matchAll(sexism)][0].groups, { sex: 'male' });
892
+ $mol_assert_like([...'sex = female'.matchAll(sexism)][0].groups, { sex: 'female' });
893
+ $mol_assert_like([...'sex = malefemale'.matchAll(sexism)][0].groups, undefined);
888
894
  },
889
895
  'force after'() {
890
- const { latin_only: letter, force_after, from } = $.$mol_regexp;
896
+ const { latin_only: letter, force_after, from } = $mol_regexp;
891
897
  const regexp = from([letter, force_after('.')]);
892
- $.$mol_assert_like('x.'.match(regexp), ['x']);
893
- $.$mol_assert_like('x,'.match(regexp), null);
898
+ $mol_assert_like('x.'.match(regexp), ['x']);
899
+ $mol_assert_like('x,'.match(regexp), null);
894
900
  },
895
901
  'forbid after'() {
896
- const { latin_only: letter, forbid_after, from } = $.$mol_regexp;
902
+ const { latin_only: letter, forbid_after, from } = $mol_regexp;
897
903
  const regexp = from([letter, forbid_after('.')]);
898
- $.$mol_assert_like('x.'.match(regexp), null);
899
- $.$mol_assert_like('x,'.match(regexp), ['x']);
904
+ $mol_assert_like('x.'.match(regexp), null);
905
+ $mol_assert_like('x,'.match(regexp), ['x']);
900
906
  },
901
907
  'char except'() {
902
- const { char_except, latin_only, tab } = $.$mol_regexp;
908
+ const { char_except, latin_only, tab } = $mol_regexp;
903
909
  const name = char_except(latin_only, tab);
904
- $.$mol_assert_like('a'.match(name), null);
905
- $.$mol_assert_like('\t'.match(name), null);
906
- $.$mol_assert_like('('.match(name), ['(']);
910
+ $mol_assert_like('a'.match(name), null);
911
+ $mol_assert_like('\t'.match(name), null);
912
+ $mol_assert_like('('.match(name), ['(']);
907
913
  },
908
914
  'unicode only'() {
909
- const { unicode_only, from } = $.$mol_regexp;
915
+ const { unicode_only, from } = $mol_regexp;
910
916
  const name = from([
911
917
  unicode_only('Script', 'Cyrillic'),
912
918
  unicode_only('Hex_Digit'),
913
919
  ]);
914
- $.$mol_assert_like('FF'.match(name), null);
915
- $.$mol_assert_like('ФG'.match(name), null);
916
- $.$mol_assert_like('ФF'.match(name), ['ФF']);
920
+ $mol_assert_like('FF'.match(name), null);
921
+ $mol_assert_like('ФG'.match(name), null);
922
+ $mol_assert_like('ФF'.match(name), ['ФF']);
917
923
  },
918
924
  'generate by optional with inner group'() {
919
- const { begin, end, from } = $.$mol_regexp;
925
+ const { begin, end, from } = $mol_regexp;
920
926
  const animals = from([begin, '#', ['^', { dog: '@' }], end]);
921
- $.$mol_assert_equal(animals.generate({}), '#');
922
- $.$mol_assert_equal(animals.generate({ dog: false }), '#');
923
- $.$mol_assert_equal(animals.generate({ dog: true }), '#^@');
924
- $.$mol_assert_fail(() => animals.generate({ dog: '$' }), 'Wrong param: dog=$');
927
+ $mol_assert_equal(animals.generate({}), '#');
928
+ $mol_assert_equal(animals.generate({ dog: false }), '#');
929
+ $mol_assert_equal(animals.generate({ dog: true }), '#^@');
930
+ $mol_assert_fail(() => animals.generate({ dog: '$' }), 'Wrong param: dog=$');
925
931
  },
926
932
  'generate by optional with inner group with variants'() {
927
- const { begin, end, from } = $.$mol_regexp;
933
+ const { begin, end, from } = $mol_regexp;
928
934
  const animals = from([begin, '#', ['^', { animal: { dog: '@', fox: '&' } }], end]);
929
- $.$mol_assert_equal(animals.generate({}), '#');
930
- $.$mol_assert_equal(animals.generate({ dog: true }), '#^@');
931
- $.$mol_assert_equal(animals.generate({ fox: true }), '#^&');
932
- $.$mol_assert_fail(() => animals.generate({ dog: '$' }), 'Wrong param: dog=$');
935
+ $mol_assert_equal(animals.generate({}), '#');
936
+ $mol_assert_equal(animals.generate({ dog: true }), '#^@');
937
+ $mol_assert_equal(animals.generate({ fox: true }), '#^&');
938
+ $mol_assert_fail(() => animals.generate({ dog: '$' }), 'Wrong param: dog=$');
933
939
  },
934
940
  'complex example'() {
935
- const { begin, end, char_only, char_range, latin_only, slash_back, repeat_greedy, from, } = $.$mol_regexp;
941
+ const { begin, end, char_only, char_range, latin_only, slash_back, repeat_greedy, from, } = $mol_regexp;
936
942
  const atom_char = char_only(latin_only, "!#$%&'*+/=?^`{|}~-");
937
943
  const atom = repeat_greedy(atom_char, 1);
938
944
  const dot_atom = from([atom, repeat_greedy(['.', atom])]);
@@ -946,9 +952,9 @@ var $;
946
952
  const local_part = from({ dot_atom, quoted_name });
947
953
  const domain = dot_atom;
948
954
  const mail = from([begin, local_part, '@', { domain }, end]);
949
- $.$mol_assert_equal('foo..bar@example.org'.match(mail), null);
950
- $.$mol_assert_equal('foo..bar"@example.org'.match(mail), null);
951
- $.$mol_assert_like([...'foo.bar@example.org'.matchAll(mail)][0].groups, {
955
+ $mol_assert_equal('foo..bar@example.org'.match(mail), null);
956
+ $mol_assert_equal('foo..bar"@example.org'.match(mail), null);
957
+ $mol_assert_like([...'foo.bar@example.org'.matchAll(mail)][0].groups, {
952
958
  domain: "example.org",
953
959
  dot_atom: "foo.bar",
954
960
  name: "",
@@ -956,7 +962,7 @@ var $;
956
962
  quoted_name: "",
957
963
  quoted_pair: "",
958
964
  });
959
- $.$mol_assert_like([...'"foo..bar"@example.org'.matchAll(mail)][0].groups, {
965
+ $mol_assert_like([...'"foo..bar"@example.org'.matchAll(mail)][0].groups, {
960
966
  dot_atom: "",
961
967
  quoted_name: '"foo..bar"',
962
968
  name: "foo..bar",
@@ -964,13 +970,13 @@ var $;
964
970
  quoted_pair: "",
965
971
  domain: "example.org",
966
972
  });
967
- $.$mol_assert_equal(mail.generate({ dot_atom: 'foo.bar', domain: 'example.org' }), 'foo.bar@example.org');
968
- $.$mol_assert_equal(mail.generate({ name: 'foo..bar', domain: 'example.org' }), '"foo..bar"@example.org');
969
- $.$mol_assert_fail(() => mail.generate({ dot_atom: 'foo..bar', domain: 'example.org' }), 'Wrong param: dot_atom=foo..bar');
973
+ $mol_assert_equal(mail.generate({ dot_atom: 'foo.bar', domain: 'example.org' }), 'foo.bar@example.org');
974
+ $mol_assert_equal(mail.generate({ name: 'foo..bar', domain: 'example.org' }), '"foo..bar"@example.org');
975
+ $mol_assert_fail(() => mail.generate({ dot_atom: 'foo..bar', domain: 'example.org' }), 'Wrong param: dot_atom=foo..bar');
970
976
  },
971
977
  });
972
978
  })($ || ($ = {}));
973
- //regexp.test.js.map
979
+ //mol/regexp/regexp.test.ts
974
980
  ;
975
981
  "use strict";
976
982
  var $;
@@ -994,18 +1000,18 @@ var $;
994
1000
  $.$mol_log3_area_lazy = $mol_log3_area_lazy;
995
1001
  $.$mol_log3_stack = [];
996
1002
  })($ || ($ = {}));
997
- //log3.js.map
1003
+ //mol/log3/log3.ts
998
1004
  ;
999
1005
  "use strict";
1000
- //extract.test.js.map
1006
+ //mol/type/keys/extract/extract.test.ts
1001
1007
  ;
1002
1008
  "use strict";
1003
- //extract.js.map
1009
+ //mol/type/keys/extract/extract.ts
1004
1010
  ;
1005
1011
  "use strict";
1006
1012
  var $;
1007
1013
  (function ($_1) {
1008
- $_1.$mol_test_mocks.push($ => {
1014
+ $mol_test_mocks.push($ => {
1009
1015
  $.$mol_log3_come = () => { };
1010
1016
  $.$mol_log3_done = () => { };
1011
1017
  $.$mol_log3_fail = () => { };
@@ -1014,7 +1020,7 @@ var $;
1014
1020
  $.$mol_log3_area = () => () => { };
1015
1021
  });
1016
1022
  })($ || ($ = {}));
1017
- //log3.test.js.map
1023
+ //mol/log3/log3.test.ts
1018
1024
  ;
1019
1025
  "use strict";
1020
1026
  var $;
@@ -1043,6 +1049,6 @@ var $;
1043
1049
  $.$mol_log3_rise = $mol_log3_web_make('log', 'magenta');
1044
1050
  $.$mol_log3_area = $mol_log3_web_make('group', 'cyan');
1045
1051
  })($ || ($ = {}));
1046
- //log3.web.js.map
1052
+ //mol/log3/log3.web.ts
1047
1053
 
1048
1054
  //# sourceMappingURL=web.test.js.map