Skip to main content

Documentation Index

Fetch the complete documentation index at: https://launchdarkly-preview.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Edge SDKs

This feature is available for all of our edge SDKs:

Akamai

The variationDetail method lets you evaluate a feature flag using the same parameters as you would for variation and receive more information about how the value was calculated.The SDK returns the variation detail in an object that contains both the result value and a reason object. These tell you more information. For example, they can tell you if the flag individually targeted the context, or if the context matched one of the flag’s rules. It will also indicate if the flag returned the default value due to an error. You can examine the reason data programmatically.Here is an example:
      const { value, variationIndex, reason } = await client.variationDetail(flagKey, context, false);
To learn more, read variationDetail, LDEvaluationDetail and LDEvaluationReason.The LDClient also provides typed variation methods for type-safe usage in TypeScript: boolVariationDetail, stringVariationDetail, numberVariationDetail, jsonVariationDetail.Every time you evaluate a flag, the SDK fetches the flag data from the EdgeKV store. Your Akamai resource tier may limit how many of these queries you can make while a single worker handler is being executed. To learn more, read Understand resource limits and caching options.

Cloudflare

The variationDetail method lets you evaluate a feature flag using the same parameters as you would for variation and receive more information about how the value was calculated.The SDK returns the variation detail in an object that contains both the result value and a “reason” object. These tell you, for instance, if the flag individually targeted the context or if the context matched one of the flag’s rules. It will also indicate if the flag returned the default value due to an error. You can examine the “reason” data programmatically, or, if you capture detailed analytics events for flags, view it with Data Export.Here is an example:
      const { value, variationIndex, reason } = await client.variationDetail(flagKey, context, false);
To learn more, read variationDetail, LDEvaluationDetail and LDEvaluationReason.The LDClient also provides typed variation methods for type-safe usage in TypeScript: boolVariationDetail, stringVariationDetail, numberVariationDetail, jsonVariationDetail.

Fastly

The variationDetail method lets you evaluate a feature flag using the same parameters as you would for variation and receive more information about how the value was calculated.The SDK returns the variation detail in an object that contains both the result value and a “reason” object. These tell you more information. For example, they can tell you if the flag individually targeted the context, or if the context matched one of the flag’s rules. It will also indicate if the flag returned the default value due to an error. You can examine the “reason” data programmatically, or, if you capture detailed analytics events for flags, view it with Data Export.Here is an example:
      const { value, variationIndex, reason } = await client.variationDetail('example-flag-key', context, false);
To learn more, read variationDetail and LDEvaluationReason.The LDClient also provides typed variation methods for type-safe usage in TypeScript: boolVariationDetail, stringVariationDetail, numberVariationDetail, jsonVariationDetail.

Vercel

The variationDetail method lets you evaluate a feature flag using the same parameters as you would for variation and receive more information about how the value was calculated.The SDK returns the variation detail in an object that contains both the result value and a “reason” object. These tell you more information. For example, they can tell you if the flag individually targeted the context, or if the context matched one of the flag’s rules. It will also indicate if the flag returned the default value due to an error. You can examine the “reason” data programmatically, or, if you capture detailed analytics events for flags, view it with Data Export.Here is an example:
      const { value, variationIndex, reason } = await client.variationDetail(flagKey, context, false);
To learn more, read variationDetail, LDEvaluationDetail and LDEvaluationReason.The LDClient also provides typed variation methods for type-safe usage in TypeScript: boolVariationDetail, stringVariationDetail, numberVariationDetail, jsonVariationDetail.