Namespace: storage

$volt.storage

VoltStorage Plug-in Library

Also aliased as window.appStorage.

Source:

Methods

(static) clear(callbackopt)

Clears all items.

Parameters:
Name Type Attributes Description
callback voltCallback <optional>

no data is returned upon success - if not passed, a promise is returned

Source:

(static) getAllItems(callbackopt)

Returns key value map of all stored items.

Parameters:
Name Type Attributes Description
callback voltCallback <optional>

upon success data will be an object with each property corresponding to a stored key/value - if not passed, a promise is returned

Source:

(static) getItem(key, callbackopt)

Returns the value of the item associated with a key.

Parameters:
Name Type Attributes Description
key string

the name of the key to retrieve

callback voltCallback <optional>

upon success, data will be the value of the key - if not passed, a promise is returned

Source:

(static) removeItem(key, callbackopt)

Removes the item associated with key.

Parameters:
Name Type Attributes Description
key string

the name of the key to remove

callback voltCallback <optional>

no data is returned upon success - if not passed, a promise is returned

Source:

(static) setItem(key, value, callbackopt)

Set a value for a new or existing key.

Parameters:
Name Type Attributes Description
key string

the name of the key to create

value *

the value to associate with the key

callback voltCallback <optional>

no data is returned upon success - if not passed, a promise is returned

Source: