LocalStoragePreferenceStore
- Kind
- class
- Source
- src/persistence/storage.js:18
Description
Preference store backed by the browser localStorage API.
Signature
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
options | Object | optional | Optional storage object, preference key, and unfinished-session key. |
Returns
Async preference store implementation.
TypeLocalStoragePreferenceStoreNotes
Inject storage for tests or app shells that need isolated storage.
Configuration
General configuration setters and compatibility helpers.
clear() → {this}
Source: src/persistence/storage.js:42
Updates the clear state on the current instance.
Returns
This instance.
TypethisgetUnfinishedSessionId(workspaceId = null, options = {})
Source: src/persistence/storage.js:46
Returns the current unfinished session id value or state.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
workspaceId | optional | null | Value passed to getUnfinishedSessionId. | |
options | Object | optional | {} | Options object for this operation. |
setUnfinishedSessionId(id, workspaceId = null) → {this}
Source: src/persistence/storage.js:57
Set the unfinished session id setting.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
id | Value passed to setUnfinishedSessionId. | |||
workspaceId | optional | null | Value passed to setUnfinishedSessionId. |
Returns
This instance.
TypethisUtilities
Additional public helpers that do not belong to a narrower API area.
unfinishedSessionKeyFor(workspaceId = null)
Source: src/persistence/storage.js:25
Configures or reads unfinished session key for.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
workspaceId | optional | null | Value passed to unfinishedSessionKeyFor. |
read()
Source: src/persistence/storage.js:30
Configures or reads read.
write(value) → {Object|this}
Source: src/persistence/storage.js:36
Read or set the write setting.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | New write value. Omit this argument to read the current value. |
Returns
Current write value when called without arguments; otherwise this instance for chaining.
TypeObject|thisExample
helios.write(1);