mol_jsx_lib 0.0.689 → 0.0.691
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 +1 -0
- package/web.deps.json +1 -1
- package/web.js +3 -0
- package/web.js.map +1 -1
- package/web.mjs +3 -0
- package/web.test.js +37 -37
- package/web.test.js.map +1 -1
package/node.mjs
CHANGED
|
@@ -231,6 +231,38 @@ var $;
|
|
|
231
231
|
;
|
|
232
232
|
"use strict";
|
|
233
233
|
var $;
|
|
234
|
+
(function ($) {
|
|
235
|
+
const named = new WeakSet();
|
|
236
|
+
function $mol_func_name(func) {
|
|
237
|
+
let name = func.name;
|
|
238
|
+
if (name?.length > 1)
|
|
239
|
+
return name;
|
|
240
|
+
if (named.has(func))
|
|
241
|
+
return name;
|
|
242
|
+
for (let key in this) {
|
|
243
|
+
try {
|
|
244
|
+
if (this[key] !== func)
|
|
245
|
+
continue;
|
|
246
|
+
name = key;
|
|
247
|
+
Object.defineProperty(func, 'name', { value: name });
|
|
248
|
+
break;
|
|
249
|
+
}
|
|
250
|
+
catch { }
|
|
251
|
+
}
|
|
252
|
+
named.add(func);
|
|
253
|
+
return name;
|
|
254
|
+
}
|
|
255
|
+
$.$mol_func_name = $mol_func_name;
|
|
256
|
+
function $mol_func_name_from(target, source) {
|
|
257
|
+
Object.defineProperty(target, 'name', { value: source.name });
|
|
258
|
+
return target;
|
|
259
|
+
}
|
|
260
|
+
$.$mol_func_name_from = $mol_func_name_from;
|
|
261
|
+
})($ || ($ = {}));
|
|
262
|
+
//mol/func/name/name.ts
|
|
263
|
+
;
|
|
264
|
+
"use strict";
|
|
265
|
+
var $;
|
|
234
266
|
(function ($) {
|
|
235
267
|
class $mol_object2 {
|
|
236
268
|
static $ = $;
|
|
@@ -265,6 +297,9 @@ var $;
|
|
|
265
297
|
toString() {
|
|
266
298
|
return this[Symbol.toStringTag] || this.constructor.name + '()';
|
|
267
299
|
}
|
|
300
|
+
static toJSON() {
|
|
301
|
+
return this.$.$mol_func_name(this);
|
|
302
|
+
}
|
|
268
303
|
toJSON() {
|
|
269
304
|
return this.toString();
|
|
270
305
|
}
|
|
@@ -817,38 +852,6 @@ var $;
|
|
|
817
852
|
;
|
|
818
853
|
"use strict";
|
|
819
854
|
var $;
|
|
820
|
-
(function ($) {
|
|
821
|
-
const named = new WeakSet();
|
|
822
|
-
function $mol_func_name(func) {
|
|
823
|
-
let name = func.name;
|
|
824
|
-
if (name?.length > 1)
|
|
825
|
-
return name;
|
|
826
|
-
if (named.has(func))
|
|
827
|
-
return name;
|
|
828
|
-
for (let key in this) {
|
|
829
|
-
try {
|
|
830
|
-
if (this[key] !== func)
|
|
831
|
-
continue;
|
|
832
|
-
name = key;
|
|
833
|
-
Object.defineProperty(func, 'name', { value: name });
|
|
834
|
-
break;
|
|
835
|
-
}
|
|
836
|
-
catch { }
|
|
837
|
-
}
|
|
838
|
-
named.add(func);
|
|
839
|
-
return name;
|
|
840
|
-
}
|
|
841
|
-
$.$mol_func_name = $mol_func_name;
|
|
842
|
-
function $mol_func_name_from(target, source) {
|
|
843
|
-
Object.defineProperty(target, 'name', { value: source.name });
|
|
844
|
-
return target;
|
|
845
|
-
}
|
|
846
|
-
$.$mol_func_name_from = $mol_func_name_from;
|
|
847
|
-
})($ || ($ = {}));
|
|
848
|
-
//mol/func/name/name.ts
|
|
849
|
-
;
|
|
850
|
-
"use strict";
|
|
851
|
-
var $;
|
|
852
855
|
(function ($) {
|
|
853
856
|
function $mol_dom_render_children(el, childNodes) {
|
|
854
857
|
const node_set = new Set(childNodes);
|
package/node.test.js
CHANGED
|
@@ -223,6 +223,38 @@ var $;
|
|
|
223
223
|
;
|
|
224
224
|
"use strict";
|
|
225
225
|
var $;
|
|
226
|
+
(function ($) {
|
|
227
|
+
const named = new WeakSet();
|
|
228
|
+
function $mol_func_name(func) {
|
|
229
|
+
let name = func.name;
|
|
230
|
+
if (name?.length > 1)
|
|
231
|
+
return name;
|
|
232
|
+
if (named.has(func))
|
|
233
|
+
return name;
|
|
234
|
+
for (let key in this) {
|
|
235
|
+
try {
|
|
236
|
+
if (this[key] !== func)
|
|
237
|
+
continue;
|
|
238
|
+
name = key;
|
|
239
|
+
Object.defineProperty(func, 'name', { value: name });
|
|
240
|
+
break;
|
|
241
|
+
}
|
|
242
|
+
catch { }
|
|
243
|
+
}
|
|
244
|
+
named.add(func);
|
|
245
|
+
return name;
|
|
246
|
+
}
|
|
247
|
+
$.$mol_func_name = $mol_func_name;
|
|
248
|
+
function $mol_func_name_from(target, source) {
|
|
249
|
+
Object.defineProperty(target, 'name', { value: source.name });
|
|
250
|
+
return target;
|
|
251
|
+
}
|
|
252
|
+
$.$mol_func_name_from = $mol_func_name_from;
|
|
253
|
+
})($ || ($ = {}));
|
|
254
|
+
//mol/func/name/name.ts
|
|
255
|
+
;
|
|
256
|
+
"use strict";
|
|
257
|
+
var $;
|
|
226
258
|
(function ($) {
|
|
227
259
|
class $mol_object2 {
|
|
228
260
|
static $ = $;
|
|
@@ -257,6 +289,9 @@ var $;
|
|
|
257
289
|
toString() {
|
|
258
290
|
return this[Symbol.toStringTag] || this.constructor.name + '()';
|
|
259
291
|
}
|
|
292
|
+
static toJSON() {
|
|
293
|
+
return this.$.$mol_func_name(this);
|
|
294
|
+
}
|
|
260
295
|
toJSON() {
|
|
261
296
|
return this.toString();
|
|
262
297
|
}
|
|
@@ -809,38 +844,6 @@ var $;
|
|
|
809
844
|
;
|
|
810
845
|
"use strict";
|
|
811
846
|
var $;
|
|
812
|
-
(function ($) {
|
|
813
|
-
const named = new WeakSet();
|
|
814
|
-
function $mol_func_name(func) {
|
|
815
|
-
let name = func.name;
|
|
816
|
-
if (name?.length > 1)
|
|
817
|
-
return name;
|
|
818
|
-
if (named.has(func))
|
|
819
|
-
return name;
|
|
820
|
-
for (let key in this) {
|
|
821
|
-
try {
|
|
822
|
-
if (this[key] !== func)
|
|
823
|
-
continue;
|
|
824
|
-
name = key;
|
|
825
|
-
Object.defineProperty(func, 'name', { value: name });
|
|
826
|
-
break;
|
|
827
|
-
}
|
|
828
|
-
catch { }
|
|
829
|
-
}
|
|
830
|
-
named.add(func);
|
|
831
|
-
return name;
|
|
832
|
-
}
|
|
833
|
-
$.$mol_func_name = $mol_func_name;
|
|
834
|
-
function $mol_func_name_from(target, source) {
|
|
835
|
-
Object.defineProperty(target, 'name', { value: source.name });
|
|
836
|
-
return target;
|
|
837
|
-
}
|
|
838
|
-
$.$mol_func_name_from = $mol_func_name_from;
|
|
839
|
-
})($ || ($ = {}));
|
|
840
|
-
//mol/func/name/name.ts
|
|
841
|
-
;
|
|
842
|
-
"use strict";
|
|
843
|
-
var $;
|
|
844
847
|
(function ($) {
|
|
845
848
|
function $mol_dom_render_children(el, childNodes) {
|
|
846
849
|
const node_set = new Set(childNodes);
|
|
@@ -3019,6 +3022,20 @@ var $;
|
|
|
3019
3022
|
;
|
|
3020
3023
|
"use strict";
|
|
3021
3024
|
var $;
|
|
3025
|
+
(function ($_1) {
|
|
3026
|
+
$mol_test({
|
|
3027
|
+
'FQN of anon function'($) {
|
|
3028
|
+
const $$ = Object.assign($, { $mol_func_name_test: (() => () => { })() });
|
|
3029
|
+
$mol_assert_equal($$.$mol_func_name_test.name, '');
|
|
3030
|
+
$mol_assert_equal($$.$mol_func_name($$.$mol_func_name_test), '$mol_func_name_test');
|
|
3031
|
+
$mol_assert_equal($$.$mol_func_name_test.name, '$mol_func_name_test');
|
|
3032
|
+
},
|
|
3033
|
+
});
|
|
3034
|
+
})($ || ($ = {}));
|
|
3035
|
+
//mol/func/name/name.test.ts
|
|
3036
|
+
;
|
|
3037
|
+
"use strict";
|
|
3038
|
+
var $;
|
|
3022
3039
|
(function ($) {
|
|
3023
3040
|
$mol_test({
|
|
3024
3041
|
'get'() {
|
|
@@ -3590,20 +3607,6 @@ var $;
|
|
|
3590
3607
|
;
|
|
3591
3608
|
"use strict";
|
|
3592
3609
|
var $;
|
|
3593
|
-
(function ($_1) {
|
|
3594
|
-
$mol_test({
|
|
3595
|
-
'FQN of anon function'($) {
|
|
3596
|
-
const $$ = Object.assign($, { $mol_func_name_test: (() => () => { })() });
|
|
3597
|
-
$mol_assert_equal($$.$mol_func_name_test.name, '');
|
|
3598
|
-
$mol_assert_equal($$.$mol_func_name($$.$mol_func_name_test), '$mol_func_name_test');
|
|
3599
|
-
$mol_assert_equal($$.$mol_func_name_test.name, '$mol_func_name_test');
|
|
3600
|
-
},
|
|
3601
|
-
});
|
|
3602
|
-
})($ || ($ = {}));
|
|
3603
|
-
//mol/func/name/name.test.ts
|
|
3604
|
-
;
|
|
3605
|
-
"use strict";
|
|
3606
|
-
var $;
|
|
3607
3610
|
(function ($) {
|
|
3608
3611
|
$mol_test({
|
|
3609
3612
|
'Primitives'() {
|