Options
All
  • Public
  • Public/Protected
  • All
Menu

To set and get values from storage

Hierarchy

  • LocalStorageHelper

Index

Constructors

Properties

logger: Logger = ...

Methods

  • clearStorage(): void
  • Method to get clear browser storage

    @example
    clearStorage()

    Returns void

  • getItem(key: string, isObjectFlag?: boolean): any
  • Method to get value from browser storage

    Parameters

    • key: string

      'key for which value needs to be fetched from stored'

    • isObjectFlag: boolean = false

      'if the value fetched is object or not'

      @example
      getItem('key',true)

    Returns any

  • removeItem(key: string): void
  • Method to remove key value pair from browser storage

    Parameters

    • key: string

      'key for which value needs to be removed'

      @example
      removeItem('key')

    Returns void

  • setItem(key: string, value: any): void
  • Method to set value to browser storage

    Parameters

    • key: string

      'key on which value is to be stored'

    • value: any

      'value to be saved in defined key'

      @example
      setItem('key','value')

    Returns void

Generated using TypeDoc