Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Storage

A simple key–value store for string data.

Each entry maps a non-null key to a `string` value. Keys are case-sensitive and unique within the store. Values may be `null`.

Hierarchy

  • Storage

Implements

Index

Constructors

Properties

Methods

Constructors

Properties

system: Storage

Stores key–value data locally in device memory.

Methods

  • get(key: string): string
  • Returns the value associated with the specified key.

    Parameters

    • key: string

      non-null key to look up.

    Returns string

    the stored value, or null if no value is associated with the key.

  • put(key: string, value: string): void
  • Stores the given value under the specified key. If an entry with the same key already exists, it will be overwritten.

    Parameters

    • key: string

      non-null key that identifies the stored value.

    • value: string

      value to store.

    Returns void

  • remove(key: string): void
  • Removes the value associated with the specified key, if present.

    Parameters

    • key: string

      non-null key of the entry to delete.

    Returns void