js-client-sdk

Home > @eppo/js-client-sdk

js-client-sdk package

Classes

Class Description
[ChromeStorageEngine](/js-client-sdk/js-client-sdk.chromestorageengine.html) Chrome storage implementation of a string-valued store for storing a configuration and its metadata. This serializes the entire configuration object into a string and then stores it to a single key within the object for another single top-level key. Same with metadata about the store (e.g., when it was last updated). Note: this behaves a bit differently than local storage as the chrome storage API gets and sets subsets of key-value pairs, so we have to dereference or re-specify the key.
[EppoJSClient](/js-client-sdk/js-client-sdk.eppojsclient.html) Client for assigning experiment variations.
[EppoPrecomputedJSClient](/js-client-sdk/js-client-sdk.eppoprecomputedjsclient.html) Client for assigning precomputed experiment variations.

Functions

Function Description
[buildStorageKeySuffix(apiKey)](/js-client-sdk/js-client-sdk.buildstoragekeysuffix.html) Builds a storage key suffix from an API key.
[getConfigUrl(apiKey, baseUrl)](/js-client-sdk/js-client-sdk.getconfigurl.html) Used to build the URL for fetching the flag configuration.
[getInstance()](/js-client-sdk/js-client-sdk.getinstance.html) Used to access a singleton SDK client instance. Use the method after calling init() to initialize the client.
[getPrecomputedInstance()](/js-client-sdk/js-client-sdk.getprecomputedinstance.html) Used to access a singleton SDK precomputed client instance. Use the method after calling precomputedInit() to initialize the client.
[init(config)](/js-client-sdk/js-client-sdk.init.html) Initializes the Eppo client with configuration parameters. This method should be called once on application startup.
[offlineInit(config)](/js-client-sdk/js-client-sdk.offlineinit.html) Initializes the Eppo client with configuration parameters. The purpose is for use-cases where the configuration is available from an external process that can bootstrap the SDK. This method should be called once on application startup.
[precomputedInit(config)](/js-client-sdk/js-client-sdk.precomputedinit.html) Initializes the Eppo precomputed client with configuration parameters. This method should be called once on application startup.

Interfaces

Interface Description
[IClientConfig](/js-client-sdk/js-client-sdk.iclientconfig.html) Configuration for regular client initialization
[IClientConfigSync](/js-client-sdk/js-client-sdk.iclientconfigsync.html) Configuration interface for synchronous client initialization.
[IPrecomputedClientConfig](/js-client-sdk/js-client-sdk.iprecomputedclientconfig.html) Configuration for Eppo precomputed client initialization