1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-28 00:17:12 +01:00
unleash.unleash/frontend/src/component/playground/Playground/AdvancedPlaygroundResultsTable/combinationCounter.ts

13 lines
340 B
TypeScript
Raw Normal View History

import { AdvancedPlaygroundFeatureSchema } from 'openapi';
export const countCombinations = (
features: AdvancedPlaygroundFeatureSchema[]
) =>
features.reduce(
(total, feature) =>
total +
Object.values(feature.environments).flatMap(env => Object.keys(env))
.length,
0
);