A KeyValueStorage for JSON-like objects using a ResourceStore as backend.

Creates a base URL by joining the input base URL with the container string. The storage assumes it has ownership over all entries in the target container so no other classes should access resources there to prevent issues.

Assumes the input keys can be safely used to generate identifiers, which will be appended to the stored base URL.

All non-404 errors will be re-thrown.

Type Parameters

  • T

Hierarchy

  • JsonResourceStorage

Implements

Constructors

Properties

container: string

Methods

  • Deletes the value stored for the given key.

    Returns

    If there was a value to delete.

    Parameters

    • key: string

      Key to delete.

    Returns Promise<boolean>

  • Returns the value stored for the given identifier. undefined if no value is stored.

    Parameters

    • key: string

    Returns Promise<undefined | T>

  • Checks if there is a value stored for the given key.

    Parameters

    • key: string

    Returns Promise<boolean>