Skip to main content

core.clientstorage

Home > @medplum/core > ClientStorage

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

ConstructorModifiersDescription
(constructor)(storage)Constructs a new instance of the ClientStorage class

Methods

MethodModifiersDescription
clear()
getObject(key)
getString(key)
setObject(key, value)
setString(key, value)