Private
logPrivate
rootDeletes a specific entry from the store.
The index of the entry we want to delete. If given an empty array as index, will delete all entries on the store.
Gets the value recorded to the given index on the store.
The index of the entry to get. If the index is empty, the whole store is returned.
The value found for the given index on the storage.
In case nothing has been recorded on the given index, returns undefined
.
In case an value which is not valid JSON is found.
Private
shouldCheck to see if the session information should be updated whenever
interacting with storage. If we are updating the existing session metrics
then running the updateSessionInfo
function again would result in an
infinite loop of updating the metrics and re-running this function.
Index to update in storage.
Whether we should update session metrics.
Updates a specific entry from the store.
If intermediary steps of the given index already contains a string, it will be overwritten.
For example, if you attempt to update something under the index ["foo", "bar"] and the storage currently contains the following data:
{
"foo": "some value"
}
It will be overwritten like so:
``json { "foo": { "bar": "new value!" } }
@param index The index of the entry to update.
@param transformFn A transformation function to apply to the currently persisted value.
@throws In case the index is an empty array.
Generated using TypeDoc
The storage index in the ordered list of keys to navigate on the store to reach a specific entry.
Example
For the index ["user", "baseline", "boolean", "tab.click"], we would search for the following entry:
{ "user": { "baseline": { "boolean": { "tab.click": <This is the value we are looking for!> } } } }