Classes
FeatureFlags
Static class that manages feature flags. Feature flags are used to enable or disable certain features of the viewer. After initialization, the flags become immutable.
new FeatureFlags()
Examples
FeatureFlags.set('EXAMPLE_FEATURE', true);
Methods
set(name, value)
Sets the value of a given feature flag. If the flag does not exist, nothing happens.
Parameters
name* string | Feature flag identifier |
value* boolean | New value of the feature flag |
* Required
isEnabled(name)
Returns whether a given feature flag is enabled.
Parameters
name* string | Feature flag identifier |
* Required
Returns
type | description |
---|---|
boolean, undefined | Feature flag value or undefined if the flag does not exist. |
print()
Prints all public feature flags and their values to the console