Class PassthroughKeyValueStorage<TVal>Abstract

Abstract class to create a KeyValueStorage by wrapping around another one.

Exposes abstract functions to modify the key before passing it to the the source storage.

Type Parameters

  • TVal

Hierarchy

Implements

Constructors

Properties

Methods

Constructors

Properties

source: KeyValueStorage<string, TVal>

Methods

  • This function will be called on the input key and used as a new key when calling the source.

    Parameters

    • key: string

      Original input key.

    Returns string

    A new key to use with the source storage.

  • This function is used when calling entries() to revert the key generated by toNewKey().

    Parameters

    • key: string

      A key generated by toNewKey()

    Returns string

    The original key.