mol_wire_lib 1.0.822 → 1.0.824
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.d.ts +7 -5
- package/node.deps.json +1 -1
- package/node.js +37 -33
- package/node.js.map +1 -1
- package/node.mjs +37 -33
- package/node.test.js +51 -47
- package/node.test.js.map +1 -1
- package/package.json +3 -3
- package/web.d.ts +7 -5
- package/web.deps.json +1 -1
- package/web.js +37 -33
- package/web.js.map +1 -1
- package/web.mjs +37 -33
package/node.mjs
CHANGED
|
@@ -437,7 +437,7 @@ var $;
|
|
|
437
437
|
try {
|
|
438
438
|
if (!having)
|
|
439
439
|
return false;
|
|
440
|
-
if (typeof having !== 'object')
|
|
440
|
+
if (typeof having !== 'object' && typeof having !== 'function')
|
|
441
441
|
return false;
|
|
442
442
|
if (having instanceof $mol_delegate)
|
|
443
443
|
return false;
|
|
@@ -500,6 +500,38 @@ var $;
|
|
|
500
500
|
;
|
|
501
501
|
"use strict";
|
|
502
502
|
var $;
|
|
503
|
+
(function ($) {
|
|
504
|
+
const named = new WeakSet();
|
|
505
|
+
function $mol_func_name(func) {
|
|
506
|
+
let name = func.name;
|
|
507
|
+
if (name?.length > 1)
|
|
508
|
+
return name;
|
|
509
|
+
if (named.has(func))
|
|
510
|
+
return name;
|
|
511
|
+
for (let key in this) {
|
|
512
|
+
try {
|
|
513
|
+
if (this[key] !== func)
|
|
514
|
+
continue;
|
|
515
|
+
name = key;
|
|
516
|
+
Object.defineProperty(func, 'name', { value: name });
|
|
517
|
+
break;
|
|
518
|
+
}
|
|
519
|
+
catch { }
|
|
520
|
+
}
|
|
521
|
+
named.add(func);
|
|
522
|
+
return name;
|
|
523
|
+
}
|
|
524
|
+
$.$mol_func_name = $mol_func_name;
|
|
525
|
+
function $mol_func_name_from(target, source) {
|
|
526
|
+
Object.defineProperty(target, 'name', { value: source.name });
|
|
527
|
+
return target;
|
|
528
|
+
}
|
|
529
|
+
$.$mol_func_name_from = $mol_func_name_from;
|
|
530
|
+
})($ || ($ = {}));
|
|
531
|
+
//mol/func/name/name.ts
|
|
532
|
+
;
|
|
533
|
+
"use strict";
|
|
534
|
+
var $;
|
|
503
535
|
(function ($) {
|
|
504
536
|
class $mol_object2 {
|
|
505
537
|
static $ = $;
|
|
@@ -531,9 +563,13 @@ var $;
|
|
|
531
563
|
return this.name;
|
|
532
564
|
}
|
|
533
565
|
destructor() { }
|
|
566
|
+
static destructor() { }
|
|
534
567
|
toString() {
|
|
535
568
|
return this[Symbol.toStringTag] || this.constructor.name + '()';
|
|
536
569
|
}
|
|
570
|
+
static toJSON() {
|
|
571
|
+
return this[Symbol.toStringTag] || this.$.$mol_func_name(this);
|
|
572
|
+
}
|
|
537
573
|
toJSON() {
|
|
538
574
|
return this.toString();
|
|
539
575
|
}
|
|
@@ -997,38 +1033,6 @@ var $;
|
|
|
997
1033
|
;
|
|
998
1034
|
"use strict";
|
|
999
1035
|
var $;
|
|
1000
|
-
(function ($) {
|
|
1001
|
-
const named = new WeakSet();
|
|
1002
|
-
function $mol_func_name(func) {
|
|
1003
|
-
let name = func.name;
|
|
1004
|
-
if (name?.length > 1)
|
|
1005
|
-
return name;
|
|
1006
|
-
if (named.has(func))
|
|
1007
|
-
return name;
|
|
1008
|
-
for (let key in this) {
|
|
1009
|
-
try {
|
|
1010
|
-
if (this[key] !== func)
|
|
1011
|
-
continue;
|
|
1012
|
-
name = key;
|
|
1013
|
-
Object.defineProperty(func, 'name', { value: name });
|
|
1014
|
-
break;
|
|
1015
|
-
}
|
|
1016
|
-
catch { }
|
|
1017
|
-
}
|
|
1018
|
-
named.add(func);
|
|
1019
|
-
return name;
|
|
1020
|
-
}
|
|
1021
|
-
$.$mol_func_name = $mol_func_name;
|
|
1022
|
-
function $mol_func_name_from(target, source) {
|
|
1023
|
-
Object.defineProperty(target, 'name', { value: source.name });
|
|
1024
|
-
return target;
|
|
1025
|
-
}
|
|
1026
|
-
$.$mol_func_name_from = $mol_func_name_from;
|
|
1027
|
-
})($ || ($ = {}));
|
|
1028
|
-
//mol/func/name/name.ts
|
|
1029
|
-
;
|
|
1030
|
-
"use strict";
|
|
1031
|
-
var $;
|
|
1032
1036
|
(function ($) {
|
|
1033
1037
|
function $mol_guid(length = 8, exists = () => false) {
|
|
1034
1038
|
for (;;) {
|
package/node.test.js
CHANGED
|
@@ -429,7 +429,7 @@ var $;
|
|
|
429
429
|
try {
|
|
430
430
|
if (!having)
|
|
431
431
|
return false;
|
|
432
|
-
if (typeof having !== 'object')
|
|
432
|
+
if (typeof having !== 'object' && typeof having !== 'function')
|
|
433
433
|
return false;
|
|
434
434
|
if (having instanceof $mol_delegate)
|
|
435
435
|
return false;
|
|
@@ -492,6 +492,38 @@ var $;
|
|
|
492
492
|
;
|
|
493
493
|
"use strict";
|
|
494
494
|
var $;
|
|
495
|
+
(function ($) {
|
|
496
|
+
const named = new WeakSet();
|
|
497
|
+
function $mol_func_name(func) {
|
|
498
|
+
let name = func.name;
|
|
499
|
+
if (name?.length > 1)
|
|
500
|
+
return name;
|
|
501
|
+
if (named.has(func))
|
|
502
|
+
return name;
|
|
503
|
+
for (let key in this) {
|
|
504
|
+
try {
|
|
505
|
+
if (this[key] !== func)
|
|
506
|
+
continue;
|
|
507
|
+
name = key;
|
|
508
|
+
Object.defineProperty(func, 'name', { value: name });
|
|
509
|
+
break;
|
|
510
|
+
}
|
|
511
|
+
catch { }
|
|
512
|
+
}
|
|
513
|
+
named.add(func);
|
|
514
|
+
return name;
|
|
515
|
+
}
|
|
516
|
+
$.$mol_func_name = $mol_func_name;
|
|
517
|
+
function $mol_func_name_from(target, source) {
|
|
518
|
+
Object.defineProperty(target, 'name', { value: source.name });
|
|
519
|
+
return target;
|
|
520
|
+
}
|
|
521
|
+
$.$mol_func_name_from = $mol_func_name_from;
|
|
522
|
+
})($ || ($ = {}));
|
|
523
|
+
//mol/func/name/name.ts
|
|
524
|
+
;
|
|
525
|
+
"use strict";
|
|
526
|
+
var $;
|
|
495
527
|
(function ($) {
|
|
496
528
|
class $mol_object2 {
|
|
497
529
|
static $ = $;
|
|
@@ -523,9 +555,13 @@ var $;
|
|
|
523
555
|
return this.name;
|
|
524
556
|
}
|
|
525
557
|
destructor() { }
|
|
558
|
+
static destructor() { }
|
|
526
559
|
toString() {
|
|
527
560
|
return this[Symbol.toStringTag] || this.constructor.name + '()';
|
|
528
561
|
}
|
|
562
|
+
static toJSON() {
|
|
563
|
+
return this[Symbol.toStringTag] || this.$.$mol_func_name(this);
|
|
564
|
+
}
|
|
529
565
|
toJSON() {
|
|
530
566
|
return this.toString();
|
|
531
567
|
}
|
|
@@ -989,38 +1025,6 @@ var $;
|
|
|
989
1025
|
;
|
|
990
1026
|
"use strict";
|
|
991
1027
|
var $;
|
|
992
|
-
(function ($) {
|
|
993
|
-
const named = new WeakSet();
|
|
994
|
-
function $mol_func_name(func) {
|
|
995
|
-
let name = func.name;
|
|
996
|
-
if (name?.length > 1)
|
|
997
|
-
return name;
|
|
998
|
-
if (named.has(func))
|
|
999
|
-
return name;
|
|
1000
|
-
for (let key in this) {
|
|
1001
|
-
try {
|
|
1002
|
-
if (this[key] !== func)
|
|
1003
|
-
continue;
|
|
1004
|
-
name = key;
|
|
1005
|
-
Object.defineProperty(func, 'name', { value: name });
|
|
1006
|
-
break;
|
|
1007
|
-
}
|
|
1008
|
-
catch { }
|
|
1009
|
-
}
|
|
1010
|
-
named.add(func);
|
|
1011
|
-
return name;
|
|
1012
|
-
}
|
|
1013
|
-
$.$mol_func_name = $mol_func_name;
|
|
1014
|
-
function $mol_func_name_from(target, source) {
|
|
1015
|
-
Object.defineProperty(target, 'name', { value: source.name });
|
|
1016
|
-
return target;
|
|
1017
|
-
}
|
|
1018
|
-
$.$mol_func_name_from = $mol_func_name_from;
|
|
1019
|
-
})($ || ($ = {}));
|
|
1020
|
-
//mol/func/name/name.ts
|
|
1021
|
-
;
|
|
1022
|
-
"use strict";
|
|
1023
|
-
var $;
|
|
1024
1028
|
(function ($) {
|
|
1025
1029
|
function $mol_guid(length = 8, exists = () => false) {
|
|
1026
1030
|
for (;;) {
|
|
@@ -3440,6 +3444,20 @@ var $;
|
|
|
3440
3444
|
;
|
|
3441
3445
|
"use strict";
|
|
3442
3446
|
var $;
|
|
3447
|
+
(function ($_1) {
|
|
3448
|
+
$mol_test({
|
|
3449
|
+
'FQN of anon function'($) {
|
|
3450
|
+
const $$ = Object.assign($, { $mol_func_name_test: (() => () => { })() });
|
|
3451
|
+
$mol_assert_equal($$.$mol_func_name_test.name, '');
|
|
3452
|
+
$mol_assert_equal($$.$mol_func_name($$.$mol_func_name_test), '$mol_func_name_test');
|
|
3453
|
+
$mol_assert_equal($$.$mol_func_name_test.name, '$mol_func_name_test');
|
|
3454
|
+
},
|
|
3455
|
+
});
|
|
3456
|
+
})($ || ($ = {}));
|
|
3457
|
+
//mol/func/name/name.test.ts
|
|
3458
|
+
;
|
|
3459
|
+
"use strict";
|
|
3460
|
+
var $;
|
|
3443
3461
|
(function ($) {
|
|
3444
3462
|
$mol_test({
|
|
3445
3463
|
'get'() {
|
|
@@ -3684,20 +3702,6 @@ var $;
|
|
|
3684
3702
|
;
|
|
3685
3703
|
"use strict";
|
|
3686
3704
|
var $;
|
|
3687
|
-
(function ($_1) {
|
|
3688
|
-
$mol_test({
|
|
3689
|
-
'FQN of anon function'($) {
|
|
3690
|
-
const $$ = Object.assign($, { $mol_func_name_test: (() => () => { })() });
|
|
3691
|
-
$mol_assert_equal($$.$mol_func_name_test.name, '');
|
|
3692
|
-
$mol_assert_equal($$.$mol_func_name($$.$mol_func_name_test), '$mol_func_name_test');
|
|
3693
|
-
$mol_assert_equal($$.$mol_func_name_test.name, '$mol_func_name_test');
|
|
3694
|
-
},
|
|
3695
|
-
});
|
|
3696
|
-
})($ || ($ = {}));
|
|
3697
|
-
//mol/func/name/name.test.ts
|
|
3698
|
-
;
|
|
3699
|
-
"use strict";
|
|
3700
|
-
var $;
|
|
3701
3705
|
(function ($_1) {
|
|
3702
3706
|
$mol_test({
|
|
3703
3707
|
'Collect deps'() {
|