mol_wire_lib 1.0.822 → 1.0.823
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 +6 -5
- package/node.deps.json +1 -1
- package/node.js +35 -32
- package/node.js.map +1 -1
- package/node.mjs +35 -32
- package/node.test.js +49 -46
- package/node.test.js.map +1 -1
- package/package.json +3 -3
- package/web.d.ts +6 -5
- package/web.deps.json +1 -1
- package/web.js +35 -32
- package/web.js.map +1 -1
- package/web.mjs +35 -32
package/node.mjs
CHANGED
|
@@ -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 $ = $;
|
|
@@ -534,6 +566,9 @@ var $;
|
|
|
534
566
|
toString() {
|
|
535
567
|
return this[Symbol.toStringTag] || this.constructor.name + '()';
|
|
536
568
|
}
|
|
569
|
+
static toJSON() {
|
|
570
|
+
return this.$.$mol_func_name(this);
|
|
571
|
+
}
|
|
537
572
|
toJSON() {
|
|
538
573
|
return this.toString();
|
|
539
574
|
}
|
|
@@ -997,38 +1032,6 @@ var $;
|
|
|
997
1032
|
;
|
|
998
1033
|
"use strict";
|
|
999
1034
|
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
1035
|
(function ($) {
|
|
1033
1036
|
function $mol_guid(length = 8, exists = () => false) {
|
|
1034
1037
|
for (;;) {
|
package/node.test.js
CHANGED
|
@@ -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 $ = $;
|
|
@@ -526,6 +558,9 @@ var $;
|
|
|
526
558
|
toString() {
|
|
527
559
|
return this[Symbol.toStringTag] || this.constructor.name + '()';
|
|
528
560
|
}
|
|
561
|
+
static toJSON() {
|
|
562
|
+
return this.$.$mol_func_name(this);
|
|
563
|
+
}
|
|
529
564
|
toJSON() {
|
|
530
565
|
return this.toString();
|
|
531
566
|
}
|
|
@@ -989,38 +1024,6 @@ var $;
|
|
|
989
1024
|
;
|
|
990
1025
|
"use strict";
|
|
991
1026
|
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
1027
|
(function ($) {
|
|
1025
1028
|
function $mol_guid(length = 8, exists = () => false) {
|
|
1026
1029
|
for (;;) {
|
|
@@ -3440,6 +3443,20 @@ var $;
|
|
|
3440
3443
|
;
|
|
3441
3444
|
"use strict";
|
|
3442
3445
|
var $;
|
|
3446
|
+
(function ($_1) {
|
|
3447
|
+
$mol_test({
|
|
3448
|
+
'FQN of anon function'($) {
|
|
3449
|
+
const $$ = Object.assign($, { $mol_func_name_test: (() => () => { })() });
|
|
3450
|
+
$mol_assert_equal($$.$mol_func_name_test.name, '');
|
|
3451
|
+
$mol_assert_equal($$.$mol_func_name($$.$mol_func_name_test), '$mol_func_name_test');
|
|
3452
|
+
$mol_assert_equal($$.$mol_func_name_test.name, '$mol_func_name_test');
|
|
3453
|
+
},
|
|
3454
|
+
});
|
|
3455
|
+
})($ || ($ = {}));
|
|
3456
|
+
//mol/func/name/name.test.ts
|
|
3457
|
+
;
|
|
3458
|
+
"use strict";
|
|
3459
|
+
var $;
|
|
3443
3460
|
(function ($) {
|
|
3444
3461
|
$mol_test({
|
|
3445
3462
|
'get'() {
|
|
@@ -3684,20 +3701,6 @@ var $;
|
|
|
3684
3701
|
;
|
|
3685
3702
|
"use strict";
|
|
3686
3703
|
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
3704
|
(function ($_1) {
|
|
3702
3705
|
$mol_test({
|
|
3703
3706
|
'Collect deps'() {
|