powered by
Checks if the given environment variable feature flag is enabled
# S3 method for env_var_feature_flag is_enabled(feature_flag)
TRUE if the environment variable is set to 'true'
Flag to be checked whether it is enabled
{ flag <- create_env_var_feature_flag("FEATURE_X") withr::with_envvar(new = list(FEATURE_X = "true"), { is_enabled(flag) # Returns TRUE }) is_enabled(flag) # Returns FALSE by default }
Run the code above in your browser using DataLab