function toLaunchDarklyContext
Since 0.2.0
toLaunchDarklyContext(context?: FlagContext): LaunchDarklyContext

Builds the LaunchDarkly evaluation context for a framework FlagContext.

Exported for direct unit testing: it is the one place a framework context is translated to the SDK's shape, and its anonymous fallback is what keeps a context-less isEnabled('flag') evaluable.

Parameters

optional
context: FlagContext

The framework targeting context

Return Type

The SDK context

Usage

import { toLaunchDarklyContext } from "feature-flags-plugin/src/index.ts";