Skip to content
FlagPilot
Menu

Node SDK

stringVariation

Evaluate a string flag, such as copy or a variant name.

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

Signature
stringVariation(key: string, ctx: Context, d: string): string
Example
const banner = flags.stringVariation('checkout-banner-text', ctx, 'Welcome');

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.