Constructor
new WebStorage(optionsopt)
Parameters:
Name | Type | Attributes | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
Settings for working with Web Storage Properties
|
Extends
Members
type :'local'|'session'|undefined
WebStorage type in use
Type:
- 'local' | 'session' | undefined
Methods
(abstract) put(dict) → {Promise}
- Overrides:
Put items in storage
Parameters:
Name | Type | Description |
---|---|---|
dict |
Object | Items to store, keys/property names must be strings. Values must be serializable to strings. |
Returns:
Resolves to the keys of values that were successfully stored.
- Type
- Promise
(abstract) fetch(keys) → {Promise}
- Overrides:
Fetch items from storage
Parameters:
Name | Type | Description |
---|---|---|
keys |
Array.<String> | Names of items to fetch from storage. |
Returns:
Resolves to an object with properties for each valid key, and the stored item with that name as the value.
- Type
- Promise
(abstract) discard(keys) → {Promise}
- Overrides:
Discard items in storage
Parameters:
Name | Type | Description |
---|---|---|
keys |
Array.<String> | Names of items to discard. |
Returns:
Resolves to an array of names of items that were successfully deleted.
- Type
- Promise