Storage

Storage

Facade to access the browser's localstorage and session storage
Author:
  • Deux Huit Huit <https://deuxhuithuit.com>
License:
  • MIT
Source:

Methods

(static) clear(regexp) → {Boolean}

Delete the data from the storage matching the Regular Expression or all the data if none is provided
Source:
Parameters:
Name Type Description
regexp RegExp Regular Expression to match the key
Returns:
Type:
Boolean

(static) get(key) → {String}

Return the value associated with the given key
Source:
Parameters:
Name Type Description
key string Access key to the storage object
Returns:
Type:
String

(static) remove(key) → {Boolean}

Delete the storage data associated with the given key
Source:
Parameters:
Name Type Description
key string Access key to the storage object
Returns:
Type:
Boolean

(static) set(key, value) → {Boolean}

Set and save a value to the given key in the storage
Source:
Parameters:
Name Type Description
key string Access key to the storage object
value * Value wanted to be saved
Returns:
Type:
Boolean