You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-5Lines changed: 15 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -114,16 +114,16 @@ app.listen(port, () => console.log(`Example app listening on port ${port}!`));
114
114
115
115
Initialize the async store based on the adapter provided.
116
116
117
-
-`@param {AsyncStoreAdapter} [adapter=AsyncStoreAdapter.DOMAIN]` - Async store adapter to use.
118
-
-`@returns {(params: AsyncStoreParams) => void}` - Returns a function that takes a callback which will be triggered once the store has been initialized.
117
+
-`@param {AsyncStoreAdapter} [adapter=AsyncStoreAdapter.DOMAIN]` - Async store adapter to use.
118
+
-`@returns {(params: AsyncStoreParams) => void}` - Returns a function that takes a callback which will be triggered once the store has been initialized.
@@ -157,7 +157,7 @@ store.set({ foo: 'Hello', bar: 'World' });
157
157
158
158
Gets a value by a key from the store.
159
159
160
-
-`@params {string} key` - Key to get from the store.
160
+
-`@params {string} key` - Key to get from the store.
161
161
-`@returns {any}` - Returns the value persisted in the store by `key` which could be `null` if key not found. Any error caught during the retrieval will be thrown and cascaded.
Gets a value by a key from the store. If anything fails, it returns `null` without emitting error event.
170
170
171
-
-`@params {string} key` - Key to get from the store.
171
+
-`@params {string} key` - Key to get from the store.
172
172
-`@returns {any}` - Returns the value persisted in the store by `key` which could be `null` if key not found. Any error caught during the retrieval will be supressed and `null` value is returned.
173
173
174
174
```js
175
175
constfoo=store.find('foo');
176
176
```
177
177
178
+
### getId()
179
+
180
+
Gets the unique domain id created for the current context/scope.
181
+
182
+
-`@returns {string | undefined}` - Returns the unique domain id.
183
+
184
+
```js
185
+
constrequestIdentifier=store.getId();
186
+
```
187
+
178
188
## Changelog
179
189
180
190
Check the [CHANGELOG](CHANGELOG.md) for release history.
0 commit comments