Namespace CAAT.Module.Storage.LocalStorage
Defined in: LocalStorage.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Method Attributes | Method Name and Description |
---|---|
<static> |
CAAT.Module.Storage.LocalStorage.load(key, defValue)
Retrieve a value from local storage.
|
<static> |
CAAT.Module.Storage.LocalStorage.remove(key)
Removes a value stored in local storage.
|
<static> |
CAAT.Module.Storage.LocalStorage.save(key, data)
Stores an object in local storage.
|
Method Detail
<static>
{object}
CAAT.Module.Storage.LocalStorage.load(key, defValue)
Retrieve a value from local storage.
- Parameters:
- key
- {string} the key to retrieve.
- defValue
- Returns:
- {object} object stored under the key parameter.
<static>
CAAT.Module.Storage.LocalStorage.remove(key)
Removes a value stored in local storage.
- Parameters:
- key
- {string}
- Returns:
- this
<static>
CAAT.Module.Storage.LocalStorage.save(key, data)
Stores an object in local storage. The data will be saved as JSON.stringify.
- Parameters:
- key
- {string} key to store data under.
- data
- {object} an object.
- Returns:
- this