Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface KeyValueStorage

Hierarchy

Index

Properties

Methods

Properties

length

length: Number

Gets the number of key/value pairs currently present in the storage object.

Methods

clear

  • clear(): void
  • Removes all key/value pairs from the storage object.

    Returns void

getItem

  • getItem(key: String): any
  • Gets a copy of the value from the storage object.

    Parameters

    • key: String

    Returns any

removeItem

  • removeItem(key: String): void
  • Removes an item from the storage object.

    Parameters

    • key: String

    Returns void

setItem

  • setItem(key: String, value: String | Number | Object): void
  • Create or update an item in the storage object.

    Parameters

    • key: String
    • value: String | Number | Object

    Returns void