2.5.7 • Published 6 years ago

presentation-storage v2.5.7

Weekly downloads
2
License
Apache-2.0
Repository
github
Last release
6 years ago

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

  • itemKey
  • object object The data to set
  • key string The key in storage

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

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 not
  • namespace 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

  • itemKey
  • object object The data to set
  • key string The key in storage

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

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

2.5.7

6 years ago

2.5.6

6 years ago

2.5.5

6 years ago

2.5.4

6 years ago

2.5.3

6 years ago

2.5.2

6 years ago