mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-28 00:17:12 +01:00
This PR adds plausible tracking of the number of feature combinations that we get from the advanced playground API. The event type has been added to plausible Relates to #3545
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
|
|
);
|