mol_jsx_lib 0.0.690 → 0.0.692
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 +2 -0
- package/web.deps.json +1 -1
- package/web.js +5 -1
- package/web.js.map +1 -1
- package/web.mjs +5 -1
- package/web.test.js +37 -37
- package/web.test.js.map +1 -1
package/node.mjs
CHANGED
|
@@ -158,7 +158,7 @@ var $;
|
|
|
158
158
|
try {
|
|
159
159
|
if (!having)
|
|
160
160
|
return false;
|
|
161
|
-
if (typeof having !== 'object')
|
|
161
|
+
if (typeof having !== 'object' && typeof having !== 'function')
|
|
162
162
|
return false;
|
|
163
163
|
if (having instanceof $mol_delegate)
|
|
164
164
|
return false;
|
|
@@ -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 $ = $;
|
|
@@ -262,9 +294,13 @@ var $;
|
|
|
262
294
|
return this.name;
|
|
263
295
|
}
|
|
264
296
|
destructor() { }
|
|
297
|
+
static destructor() { }
|
|
265
298
|
toString() {
|
|
266
299
|
return this[Symbol.toStringTag] || this.constructor.name + '()';
|
|
267
300
|
}
|
|
301
|
+
static toJSON() {
|
|
302
|
+
return this[Symbol.toStringTag] || this.$.$mol_func_name(this);
|
|
303
|
+
}
|
|
268
304
|
toJSON() {
|
|
269
305
|
return this.toString();
|
|
270
306
|
}
|
|
@@ -817,38 +853,6 @@ var $;
|
|
|
817
853
|
;
|
|
818
854
|
"use strict";
|
|
819
855
|
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
856
|
(function ($) {
|
|
853
857
|
function $mol_dom_render_children(el, childNodes) {
|
|
854
858
|
const node_set = new Set(childNodes);
|
package/node.test.js
CHANGED
|
@@ -150,7 +150,7 @@ var $;
|
|
|
150
150
|
try {
|
|
151
151
|
if (!having)
|
|
152
152
|
return false;
|
|
153
|
-
if (typeof having !== 'object')
|
|
153
|
+
if (typeof having !== 'object' && typeof having !== 'function')
|
|
154
154
|
return false;
|
|
155
155
|
if (having instanceof $mol_delegate)
|
|
156
156
|
return false;
|
|
@@ -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 $ = $;
|
|
@@ -254,9 +286,13 @@ var $;
|
|
|
254
286
|
return this.name;
|
|
255
287
|
}
|
|
256
288
|
destructor() { }
|
|
289
|
+
static destructor() { }
|
|
257
290
|
toString() {
|
|
258
291
|
return this[Symbol.toStringTag] || this.constructor.name + '()';
|
|
259
292
|
}
|
|
293
|
+
static toJSON() {
|
|
294
|
+
return this[Symbol.toStringTag] || this.$.$mol_func_name(this);
|
|
295
|
+
}
|
|
260
296
|
toJSON() {
|
|
261
297
|
return this.toString();
|
|
262
298
|
}
|
|
@@ -809,38 +845,6 @@ var $;
|
|
|
809
845
|
;
|
|
810
846
|
"use strict";
|
|
811
847
|
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
848
|
(function ($) {
|
|
845
849
|
function $mol_dom_render_children(el, childNodes) {
|
|
846
850
|
const node_set = new Set(childNodes);
|
|
@@ -3019,6 +3023,20 @@ var $;
|
|
|
3019
3023
|
;
|
|
3020
3024
|
"use strict";
|
|
3021
3025
|
var $;
|
|
3026
|
+
(function ($_1) {
|
|
3027
|
+
$mol_test({
|
|
3028
|
+
'FQN of anon function'($) {
|
|
3029
|
+
const $$ = Object.assign($, { $mol_func_name_test: (() => () => { })() });
|
|
3030
|
+
$mol_assert_equal($$.$mol_func_name_test.name, '');
|
|
3031
|
+
$mol_assert_equal($$.$mol_func_name($$.$mol_func_name_test), '$mol_func_name_test');
|
|
3032
|
+
$mol_assert_equal($$.$mol_func_name_test.name, '$mol_func_name_test');
|
|
3033
|
+
},
|
|
3034
|
+
});
|
|
3035
|
+
})($ || ($ = {}));
|
|
3036
|
+
//mol/func/name/name.test.ts
|
|
3037
|
+
;
|
|
3038
|
+
"use strict";
|
|
3039
|
+
var $;
|
|
3022
3040
|
(function ($) {
|
|
3023
3041
|
$mol_test({
|
|
3024
3042
|
'get'() {
|
|
@@ -3590,20 +3608,6 @@ var $;
|
|
|
3590
3608
|
;
|
|
3591
3609
|
"use strict";
|
|
3592
3610
|
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
3611
|
(function ($) {
|
|
3608
3612
|
$mol_test({
|
|
3609
3613
|
'Primitives'() {
|