core.clientstorage | Medplum

ClientStorage class

The ClientStorage class is a utility class for storing strings and objects.

When using MedplumClient in the browser, it will be backed by browser localStorage. When Using MedplumClient in the server, it will be backed by the MemoryStorage class. For example, the Medplum CLI uses FileSystemStorage.

Signature:

export declare class ClientStorage implements IClientStorage

Implements: IClientStorage

Constructors

Constructor Modifiers Description
(constructor)(storage, prefix) Constructs a new instance of the ClientStorage class

Methods

Method Modifiers Description
clear()
getObject(key)
getString(key)
makeKey(key)
setObject(key, value)
setString(key, value)