A LaunchDarkly context object. If unspecified, an anonymous context with kind: 'user' will be created and used.
Defers initialization of the LaunchDarkly client until ldInit is called explicitly.
Options to pass to the underlying javascript SDK.
Enables or disables automatically subscribing to live updates to flags referenced using useLDFlag.
Vue plugin wrapper for the LaunchDarkly JavaScript SDK.
If provided with a clientSideID will initialize the LaunchDarkly client automatically (unless deferInitialization
is true).
Injection key used to retrieve LaunchDarkly client. Usage: const ldClient = inject(LD_CLIENT)
.
Alternatively use useLDClient.
Injection key used to retrieve ldFlag
function. Usage: const ldFlag = inject(LD_FLAG)
.
Alternatively use useLDFlag.
Injection key used to retreive LaunchDarkly client initialization function. Usage: const ldInit = inject(LD_INIT)
.
Alternatively use ldInit.
Injection key used to retrieve a boolean ref indicating if the LaunchDarkly client has finished initializing.
Usage: const ldReady = inject(LD_READY)
.
Alternatively use useLDReady.
Initializes the LaunchDarkly client.
Uses Vue's inject API, and will only work if run inside a Vue setup hook or <script setup>
.
Provides the LaunchDarkly JavaScript client,
https://launchdarkly.github.io/js-client-sdk/interfaces/launchdarkly_js_client_sdk.ldclient.html.
Uses Vue's inject API, and will only work if run inside a Vue setup hook or <script setup>
.
Evaluates a single feature flag. Automatically subscribes to streamed updates
unless the streaming
option was set to false.
Uses Vue's inject API, so will only work if run inside a Vue setup hook or <script setup>
.
Type of the flag's value. Can be inferred if a default value is provided.
Key of the feature flag to be evaluated.
Default value to be used while flag value loads, or if flag cannot be found.
Readonly ref to the flag's value.
Indicates if the LaunchDarkly client has finished initializing. Uses Vue's inject API, and will only
work if run inside a Vue setup hook or <script setup>
.
Readonly boolean reference indicating if the LaunchDarkly client has finished initializing.
Generated using TypeDoc
Indicates which LaunchDarkly project to use. Must be provided here or in a call to ldInit for the SDK to work.