Module: siteKiosk.io.localStorage

This module provides a key-value store for SiteKiosk applications.

Example

//clear all values
siteKiosk.io.localStorage.clear();
siteKiosk.io.localStorage.setObject('foo',{foo: 'bar'});

//prints 'bar'
console.log(siteKiosk.io.localStorage.getObject('foo').foo);

Methods

<static> clear()

Deletes all values stored for this application.

<static> deleteValue(key)

Deletes an value from key value store with a given key.
Parameters:
Name Type Description
key string The key of the object to delete

<static> getObject(key) → {Object}

Gets an object from key value store with a given key.
Parameters:
Name Type Description
key string The key under which the object is being stored
Returns:
The object which is stored
Type
Object

<static> setObject(key, object)

Sets an object in store with a given key.
Parameters:
Name Type Description
key string The key under which the object will be stored
object Object The object which will be stored