Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Memory

A Class that implements the basic storage interface, used as an alternative to localStorage.

Hierarchy

  • Memory

Implements

  • Storage

Indexable

[index: number]: string

A Class that implements the basic storage interface, used as an alternative to localStorage.

Index

Accessors

length

  • get length(): number

Methods

clear

  • clear(): void

getItem

  • getItem(key: string): string | null
  • Will retrieve the value from storage and return it.

    Parameters

    • key: string

      The key for the value to be returned

    Returns string | null

    value - The value associated with the key

key

  • key(index: number): string | null

removeItem

  • removeItem(key: string): void
  • Will remove the item from storage

    Parameters

    • key: string

      The key for the value to be removed

    Returns void

setItem

  • setItem(key: string, value: any): void
  • Will store the item in memory

    Parameters

    • key: string

      The key used to identify the stored value

    • value: any

      The value to be stored

    Returns void

Generated using TypeDoc