WebStorageService

WebStorageService

new WebStorageService()

Methods

clear()

Clears all entries from storage

getItem(key) → {*}

Get value associated with the key

Parameters:
Name Type Description
key string
Returns:

value or null

Type
*

key(index) → {*}

Returns key at index position

Parameters:
Name Type Description
index string

position at which the key is requested

Returns:

key or null

Type
*

removeItem(key)

Removes entry from storage for given key

Parameters:
Name Type Description
key string

setItem(key, data)

Sets value for given key-value pair

Parameters:
Name Type Description
key string

associated with data.

data any

payload to be stored in cache