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