Skip to main content

isFeatureEnabled

@webda/core


Function: isFeatureEnabled()

isFeatureEnabled(flag, options?): Promise<boolean>

Defined in: packages/core/src/services/featureflags.ts:187

Evaluate a flag with the current context (useContext()). Default when nobody knows the flag: defaultValue (false).

Parameters​

flag​

string

flag name

options?​

evaluation options

context?​

OperationContext

operation context

defaultValue?​

boolean

default value when no provider handles the flag

operationId?​

string

operation ID being evaluated

Returns​

Promise<boolean>

boolean indicating if the feature is enabled