File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -142,6 +142,18 @@ const store = require('@leapfrogtechnology/async-store');
142142app .use (store .initializeMiddleware ());
143143```
144144
145+ ### isInitialized()
146+
147+ Check if the store has been initialized or not.
148+
149+ - ` @returns {boolean} ` - Returns either true or false.
150+
151+ ``` js
152+ if (store .isInitialized ()) {
153+ // Do something.
154+ }
155+ ```
156+
145157### set()
146158
147159Persists properties in the store.
@@ -177,9 +189,10 @@ const foo = store.find('foo');
177189
178190### getId()
179191
180- Gets the unique domain id created for the current context/scope.
192+ Gets the unique store id created for the current context/scope.
193+ Example: If used in express, it returns unique store id per request.
181194
182- - ` @returns {string | undefined} ` - Returns the unique domain id.
195+ - ` @returns {string | undefined} ` - Returns the unique store id.
183196
184197``` js
185198const requestIdentifier = store .getId ();
You can’t perform that action at this time.
0 commit comments