Class: Storage

Storage

Members

prefixString

Prefix for key (id element).

savedKeysArray

Saved keys.

Methods

loadValue(key, defaultValue)

Load data from localStorage.

Parameters:
Name Type Description
key String

Key string.

defaultValue Object

Object containing the loaded data.

Returns: {undefined}

reset(key)

Reset given data from localStorage.

Parameters:
Name Type Description
key String

Key string.

resetAll()

Reset all data from localStorage.

saveValue(key, value)

Save data to localStorage.

Parameters:
Name Type Description
key String

Key string.

value Mixed

Value to save.