Skip to content
FlagPilot
Menu

Node SDK

numberVariation

Evaluate a number flag, such as a limit or a timeout.

The typed helper for number flags. A flag of another type returns your default with ERROR / WRONG_TYPE.

Signature
numberVariation(key: string, ctx: Context, d: number): number
Example
const maxItems = flags.numberVariation('max-items', ctx, 10);

The SDK is @rollkit/sdk in the repository (packages/sdk). It is for server-side Node; browsers use a client key with the delivery API.