aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/models/capability.ts
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-ui/src/app/models/capability.ts')
-rw-r--r--catalog-ui/src/app/models/capability.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/catalog-ui/src/app/models/capability.ts b/catalog-ui/src/app/models/capability.ts
index caef2e87dd..4a4f821e0c 100644
--- a/catalog-ui/src/app/models/capability.ts
+++ b/catalog-ui/src/app/models/capability.ts
@@ -45,6 +45,13 @@ export class CapabilitiesGroup {
});
return this[key];
}
+
+ public static getFlattenedCapabilities(capabilitiesGroup: CapabilitiesGroup): Array<Capability> {
+ return _.reduce(
+ _.toArray(capabilitiesGroup),
+ (allCaps, capArr) => allCaps.concat(capArr),
+ []);
+ }
}
export class Capability implements RequirementCapabilityModel{