Options
All
  • Public
  • Public/Protected
  • All
Menu

Class LocalStorage

Hierarchy

  • LocalStorage

Index

Constructors

Methods

Constructors

Protected constructor

  • Returns LocalStorage

Methods

Static clear

  • clear(): void
  • Alias for deleteAll.

    Returns void

Static delete

  • delete(key: string): void
  • Deletes the specified key from the local storage.

    Parameters

    • key: string

    Returns void

Static deleteAll

  • deleteAll(): void
  • Deletes all keys from the local storage.

    Returns void

Static get

  • get(key: string): any
  • Gets the value from the specified key in the local storage.

    Parameters

    • key: string

    Returns any

Static has

  • has(key: string): boolean
  • Parameters

    • key: string

    Returns boolean

Static save

  • save(): void
  • Saves the changes to the disk.

    Returns void

Static set

  • set(key: string, value: any): void
  • Sets the specified key to the specified value in the local storage.

    Parameters

    • key: string
    • value: any

    Returns void