Classes
Methods
# deleteData(key)
Delete data from storage for a given key.
Checks session then local storage for a key, deletes the first one it finds.
Parameters:
| Name | Type | Description | 
|---|---|---|
key | 
  
  string | The key you want to delete from storage  | 
# loadData(key, options)
Load data from storage for a given key. The StorageManager internally handles adding an application specific
prefix to the key provided to prevent possible overlap of data spaces for co-hosted applications.
There are currently no supported options for the loadData function.
Parameters:
| Name | Type | Description | 
|---|---|---|
key | 
  
  string | The key you want to load from storage  | 
options | 
  
  Object | Additional load options  | 
# saveData(key, value, options) → {Object}
Save data to local or session storage depending on options provided. Contains a JSON.stringify call to allow the
storage of more complex object data. If JSON.parse(JSON.stringify(<your object>)) works then it can be saved.
The StorageManager internally handles adding an application specific prefix to the storage keys to prevent the
possible overlap of data spaces for co-hosted applications.
The default behaviour of the save function is not persistent (session storage) and doesn't overwrite existing keys.
Parameters:
| Name | Type | Description | 
|---|---|---|
key | 
  
  string | The key you want to save the data under  | 
value | 
  
  * | The data you want to save  | 
options | 
  
  Object | Additional save options  | 
update | 
  
  boolean | Used to overwrite data if the provided key already exists  | 
persist | 
  
  boolean | Used to determine if session or local storage is used. True is local (persistent)  | 
An Object containing data defining the outcome of the save request
# updateData(key, value, options)
A wrapper function for saveData where the update option is forced to true.
Will overwrite existing keys or save the new key.
Parameters:
| Name | Type | Description | 
|---|---|---|
key | 
  
  string | The key you want update or save new data too  | 
value | 
  
  * | The data you want to save  | 
options | 
  
  Object | Additional update options  | 
persist | 
  
  boolean | Used to determine if session or local storage is used. True is local (persistent)  |