The Firebase JS SDK is now in BETA!
This EAP site is no longer maintained. See the official Firebase Documentation site for the latest documentation and information about the Firebase JS SDK.

Home > @firebase/remote-config

remote-config package

Firebase Remote Config

Functions

Function Description
activate(remoteConfig) Makes the last fetched config available to the getters.
ensureInitialized(remoteConfig) Ensures the last activated config are available to the getters.
fetchAndActivate(remoteConfig) Performs fetch and activate operations, as a convenience.
fetchConfig(remoteConfig) Fetches and caches configuration from the Remote Config service.
getAll(remoteConfig) Gets all config.
getBoolean(remoteConfig, key) Gets the value for the given key as a boolean.Convenience method for calling remoteConfig.getValue(key).asBoolean().
getNumber(remoteConfig, key) Gets the value for the given key as a number.Convenience method for calling remoteConfig.getValue(key).asNumber().
getRemoteConfig(app)
getString(remoteConfig, key) Gets the value for the given key as a string. Convenience method for calling remoteConfig.getValue(key).asString().
getValue(remoteConfig, key) Gets the Value for the given key.
setLogLevel(remoteConfig, logLevel) Defines the log level to use.

Interfaces

Interface Description
RemoteConfig The Firebase Remote Config service interface.
Settings Defines configuration options for the Remote Config SDK.
Value Wraps a value with metadata and type-safe getters.

Type Aliases

Type Alias Description
FetchStatus Summarizes the outcome of the last attempt to fetch config from the Firebase Remote Config server.
  • "no-fetch-yet" indicates the RemoteConfig instance has not yet attempted to fetch config, or that SDK initialization is incomplete.
  • "success" indicates the last attempt succeeded.
  • "failure" indicates the last attempt failed.
  • "throttle" indicates the last attempt was rate-limited.
LogLevel Defines levels of Remote Config logging.
ValueSource Indicates the source of a value.
  • "static" indicates the value was defined by a static constant.
  • "default" indicates the value was defined by default config.
  • "remote" indicates the value was defined by fetched config.