Node SDK
variationDetail
Evaluate a flag and get the value with the reason, variation id and versions.
Returns what variation returns plus why: the reason (OFF, OVERRIDE, RULE_MATCH, FALLTHROUGH or ERROR with an error kind), the variation id, and the flag and snapshot versions it came from.
Use it for logging and debugging. The dashboard’s debugger runs the same engine, so the two agree for the same context.
variationDetail<T>(key: string, ctx: Context, defaultValue: T): VariationDetail<T>const d = flags.variationDetail('new-checkout', ctx, false);
// { value, variationId, reason, flagVersion, snapshotVersion }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.