Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Implemented by

Index

Methods

delete

  • Deletes a specific entry from the store.

    Parameters

    • index: StorageIndex

      The index of the entry we want to delete. If given an empty array as index, will delete all entries on the store.

    Returns Promise<void>

get

  • Gets the value recorded to the given index on the store.

    throws

    In case an value which is not valid JSON is found.

    Parameters

    • Optional index: StorageIndex

      The index of the entry to get. If the index is empty, the whole store is returned.

    Returns Promise<undefined | JSONValue>

    The value found for the given index on the storage. In case nothing has been recorded on the given index, returns undefined.

update

  • Updates a specific entry from the store.

    Note

    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.

    Parameters

    Returns Promise<void>

Generated using TypeDoc