Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Storage

Hierarchy

  • Storage

Indexable

[name: string]: any

Index

Properties

Methods

Properties

length

length: number

Returns the number of key/value pairs currently present in the list associated with the object.

Methods

clear

  • clear(): void
  • Empties the list associated with the object of all key/value pairs, if there are any.

    Returns void

getItem

  • getItem(key: string): string | null
  • value = storage[key]

    Parameters

    • key: string

    Returns string | null

key

  • key(index: number): string | null
  • Returns the name of the nth key in the list, or null if n is greater than or equal to the number of key/value pairs in the object.

    Parameters

    • index: number

    Returns string | null

removeItem

  • removeItem(key: string): void
  • delete storage[key]

    Parameters

    • key: string

    Returns void

setItem

  • setItem(key: string, value: string): void
  • storage[key] = value

    Parameters

    • key: string
    • value: string

    Returns void

Generated using TypeDoc