Add decide method for feature gate creation

This commit is contained in:
Aj Wazzan
2025-04-15 13:34:27 -07:00
parent 8160df2991
commit c799caac3c

View File

@@ -12,4 +12,7 @@ export const createFeatureGate = (key: string) => flag<boolean, StatsigUser>({
key,
adapter: statsigAdapter.featureGate((gate) => gate.value, { exposureLogging: true }),
identify,
decide() {
return Math.random() > 0.1;
},
});