storage
Enables extensions to store and retrieve data.
The storage API has two storage areas you can use: local
and secure
, where the value on the secure
area will be encrypted using the electron safeStorage
API before it gets stored.
Functions
storage.StorageArea.get
storage.StorageArea.get(key: string | string[]): Promise<Record<string, Values>>;
Retrieve a value or multiple values from the storage.
Example
storage.StorageArea.getAll
storage.StorageArea.getAll(): Promise<Record<string, Values>>;
Retrieve all the storage values.
Example
storage.StorageArea.set
storage.StorageArea.set(key: string, value: Values): Promise<void>;
Store a value into the storage.
Example
storage.StorageArea.remove
storage.StorageArea.remove(key: string | string[]): Promise<void>;
Remove a value or multiple values from the storage.
Example
storage.StorageArea.clear
storage.StorageArea.clear(): Promise<void>;
Clear the storage values.
Example
Types
storage.Values
Supported values in the storage.