presentation-storage v2.5.7
presentation-storage
Augmented.js Presentation Storage Module
API
Table of Contents
LocalStorage
Local Storage API - returned from LocalStorageFactory
Parameters
persist
boolean Persistant storage or not
isSupported
is Persistant or not
Properties
isPersisted
boolean Persistant property
isSupported
Is storage supported
Returns boolean Returns true if supported
getItem
Gets an item from storage
Parameters
itemKey
key
string The key in storage
Returns object Returns object from storage
setItem
Sets an item to storage
Parameters
removeItem
Removes an item from storage
Parameters
itemKey
key
string The key in storage
clear
Clears storage - Warning: Destructive in non-namespaced instances!
key
Gets the key from storage for index
Parameters
i
number The index in storage
Returns string Returns the key from storage
length
The length of storage by keys
Returns number Returns the length of storage by keys
LocalStorageFactory
LocalStorageFactory Retrieve a local storage Object
getStorage
Get the storage instance
Parameters
persist
boolean Persistance or notnamespace
string The namespace of the storage if needed (optional)
Returns LocalStorage Returns an instance of local storage
NamespacedLocalStorage
Extends LocalStorage
NamespacedLocalStorage Retrieve a local storage Object
Parameters
persist
namespace
isSupported
Is storage supported
Returns boolean Returns true if supported
getItem
Gets an item from storage
Parameters
itemKey
key
string The key in storage
Returns object Returns object from storage
setItem
Sets an item to storage
Parameters
removeItem
Removes an item from storage
Parameters
itemKey
key
string The key in storage
clear
Clears storage for namespace
key
Gets the key from storage for index
Parameters
i
number The index in storage
Returns string Returns the key from storage
length
The length of storage by keys
Returns number Returns the length of storage by keys
getNamespacedItems
Gets the namespaced items as a Map
Returns AugmentedMap Returns the namespaced storage as Map