Storage facade compatible with localStorage and sessionStorage
- License:
- MIT
- MIT
- Source:
Members
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) factory() → {Object}
Factory of the storage object
- Source:
Returns:
- Type:
-
Object
All storage's methods
(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