mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-28 00:17:12 +01:00
13 lines
340 B
TypeScript
13 lines
340 B
TypeScript
|
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
|
||
|
);
|