Transforms the keys into relative paths, to be used by the source storage. Encodes the input key with base64 encoding, to make sure there are no invalid or special path characters, and prepends it with the stored relative path. This can be useful to eventually generate URLs in specific containers without having to worry about cleaning the input keys.

Type Parameters

  • T

Hierarchy

  • EncodingPathStorage

Implements

Constructors

Properties

basePath: string
source: KeyValueStorage<string, T>

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>