@adaas/a-concept 0.3.5 → 0.3.6
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/browser/index.mjs +2 -2
- package/dist/browser/index.mjs.map +1 -1
- package/dist/node/index.cjs +11 -5
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.mjs +11 -5
- package/dist/node/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/A-Feature/A-Feature-Extend.decorator.ts +23 -7
- package/tests/A-Feature.test.ts +10 -19
package/dist/node/index.cjs
CHANGED
|
@@ -2814,14 +2814,20 @@ function A_Feature_Extend(param1) {
|
|
|
2814
2814
|
const existedMetaValue = [
|
|
2815
2815
|
...existedMeta.get(targetRegexp.source) || []
|
|
2816
2816
|
];
|
|
2817
|
+
const currentFeatureName = param1 && typeof param1 === "object" && !A_TypeGuards.isRegExp(param1) && param1.name || propertyKey;
|
|
2817
2818
|
for (const [key, handlers] of existedMeta.entries()) {
|
|
2818
2819
|
const indexInAnother = handlers.findIndex((item) => item.handler === propertyKey);
|
|
2819
2820
|
if (key !== targetRegexp.source && indexInAnother !== -1) {
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2821
|
+
const keyStr = String(key);
|
|
2822
|
+
const featureNameMatch = keyStr.match(/\\\.\s*([^\\.$]+)\$$/);
|
|
2823
|
+
const otherFeatureName = featureNameMatch ? featureNameMatch[1] : null;
|
|
2824
|
+
if (otherFeatureName === currentFeatureName) {
|
|
2825
|
+
handlers.splice(indexInAnother, 1);
|
|
2826
|
+
if (handlers.length === 0) {
|
|
2827
|
+
existedMeta.delete(key);
|
|
2828
|
+
} else {
|
|
2829
|
+
existedMeta.set(key, handlers);
|
|
2830
|
+
}
|
|
2825
2831
|
}
|
|
2826
2832
|
}
|
|
2827
2833
|
}
|