mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-06 00:07:44 +01:00
17 lines
377 B
TypeScript
17 lines
377 B
TypeScript
export const resolveDefaultParamValue = (
|
|
name: string,
|
|
featureToggleName: string
|
|
): string | number => {
|
|
switch (name) {
|
|
case 'percentage':
|
|
case 'rollout':
|
|
return 100;
|
|
case 'stickiness':
|
|
return 'default';
|
|
case 'groupId':
|
|
return featureToggleName;
|
|
default:
|
|
return '';
|
|
}
|
|
};
|