Class Storage

Hierarchy

  • Storage

Implements

Indexable

[name: string]: any

Accessors

Methods

  • Get an item from the provided key from the data store.

    Parameters

    • key: string

      The name of the key you want to retrieve the value of.

    Returns null | string

    A string containing the value of the key. If the key does not exist, null is returned.

  • Retrieves the name of the nth key in the data store. The order of keys is user-agent defined, so you should not rely on it.

    Parameters

    • index: number

      The number of the key you want to get the name of. This is a zero-based index.

    Returns null | string

    A string containing the name of the key. If the index does not exist, null is returned.

  • Removes the provided key from the data store, if it exists.

    If there is no item associated with the given key, this method will do nothing.

    Parameters

    • key: string

      The name of the key you want to remove.

    Returns void

  • Adds or updates the key to the data store with the provided value.

    Parameters

    • key: string

      The name of the key you want to create / update.

    • value: string

      The value you want to give the key you are creating / updating.

    Returns void

Generated using TypeDoc