Clears the store, removing all key-value pairs.
Note: To clear the storage and reset it to it's default
value, use reset
instead.
Removes a key-value pair from the store.
Returns a list of all entries in the store.
Returns the value for the given key
or null
the key does not exist.
Returns true
if the given key
exists in the store.
Returns a list of all key in the store.
Returns the number of key-value pairs in the store.
Attempts to load the on-disk state at the stores path
into memory.
This method is useful if the on-disk state was edited by the user and you want to synchronize the changes.
Note: This method does not emit change events.
Listen to changes on the store.
A promise resolving to a function to unlisten to the event.
Listen to changes on a store key.
A promise resolving to a function to unlisten to the event.
Resets the store to it's default
value.
If no default value has been set, this method behaves identical to clear
.
Saves the store to disk at the stores path
.
As the store is only persistet to disk before the apps exit, changes might be lost in a crash. This method let's you persist the store to disk whenever you deem necessary.
Inserts a key-value pair into the store.
Returns a list of all values in the store.
Generated using TypeDoc
A key-value store persisted by the backend layer.