js-client-sdk

Home > @eppo/js-client-sdk > ChromeStorageEngine

ChromeStorageEngine class

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.

Signature:

export declare class ChromeStorageEngine implements IStringStorageEngine 

Implements: IStringStorageEngine

Constructors

Constructor Modifiers Description
(constructor)(storageMap, storageKeySuffix)   Constructs a new instance of the ChromeStorageEngine class

Properties

Property Modifiers Type Description
getContentsJsonString   () => Promise<string | null>  
getMetaJsonString   () => Promise<string | null>  
setContentsJsonString   (configurationJsonString: string) => Promise<void>  
setMetaJsonString   (metaJsonString: string) => Promise<void>