phecda-core 5.2.0 → 5.2.1
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/dist/index.js +7 -4
- package/dist/index.mjs +7 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -288,11 +288,10 @@ function isAsyncFunc(fn) {
|
|
|
288
288
|
__name(isAsyncFunc, "isAsyncFunc");
|
|
289
289
|
function invoke(instance, key, ...params) {
|
|
290
290
|
const metaKeys = getMetaKey(instance);
|
|
291
|
-
const names = [];
|
|
292
291
|
return Promise.allSettled(metaKeys.map((k) => {
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
292
|
+
const names = [];
|
|
293
|
+
const meta = getMeta(instance, k);
|
|
294
|
+
return meta.filter((item) => {
|
|
296
295
|
if (item.__NAME__) {
|
|
297
296
|
if (names.includes(item.__NAME__)) {
|
|
298
297
|
return false;
|
|
@@ -302,6 +301,10 @@ function invoke(instance, key, ...params) {
|
|
|
302
301
|
} else {
|
|
303
302
|
return true;
|
|
304
303
|
}
|
|
304
|
+
});
|
|
305
|
+
}).flat().filter((item) => {
|
|
306
|
+
if (typeof item[key] === "function") {
|
|
307
|
+
return true;
|
|
305
308
|
} else {
|
|
306
309
|
return false;
|
|
307
310
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -201,11 +201,10 @@ function isAsyncFunc(fn) {
|
|
|
201
201
|
__name(isAsyncFunc, "isAsyncFunc");
|
|
202
202
|
function invoke(instance, key, ...params) {
|
|
203
203
|
const metaKeys = getMetaKey(instance);
|
|
204
|
-
const names = [];
|
|
205
204
|
return Promise.allSettled(metaKeys.map((k) => {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
205
|
+
const names = [];
|
|
206
|
+
const meta = getMeta(instance, k);
|
|
207
|
+
return meta.filter((item) => {
|
|
209
208
|
if (item.__NAME__) {
|
|
210
209
|
if (names.includes(item.__NAME__)) {
|
|
211
210
|
return false;
|
|
@@ -215,6 +214,10 @@ function invoke(instance, key, ...params) {
|
|
|
215
214
|
} else {
|
|
216
215
|
return true;
|
|
217
216
|
}
|
|
217
|
+
});
|
|
218
|
+
}).flat().filter((item) => {
|
|
219
|
+
if (typeof item[key] === "function") {
|
|
220
|
+
return true;
|
|
218
221
|
} else {
|
|
219
222
|
return false;
|
|
220
223
|
}
|