| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 682d0a9 commit 8620458
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1000,14 +1000,14 @@ added: v13.10.0 | |||
| 1000 | 1000 | --> | |
| 1001 | 1001 | ||
| 1002 | 1002 | Creates a new instance of `AsyncLocalStorage`. Store is only provided within a | |
| 1003 | - `run` or after `enterWith` method call. | ||
| 1003 | + `run()` call or after an `enterWith()` call. | ||
| 1004 | 1004 | ||
| 1005 | 1005 | ### `asyncLocalStorage.disable()` | |
| 1006 | 1006 | <!-- YAML | |
| 1007 | 1007 | added: v13.10.0 | |
| 1008 | 1008 | --> | |
| 1009 | 1009 | ||
| 1010 | - This method disables the instance of `AsyncLocalStorage`. All subsequent calls | ||
| 1010 | + Disables the instance of `AsyncLocalStorage`. All subsequent calls | ||
| 1011 | 1011 | to `asyncLocalStorage.getStore()` will return `undefined` until | |
| 1012 | 1012 | `asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()` is called again. | |
| 1013 | 1013 | ||
@@ -1019,7 +1019,7 @@ Calling `asyncLocalStorage.disable()` is required before the | |||
| 1019 | 1019 | provided by the `asyncLocalStorage`, as those objects are garbage collected | |
| 1020 | 1020 | along with the corresponding async resources. | |
| 1021 | 1021 | ||
| 1022 | - This method is to be used when the `asyncLocalStorage` is not in use anymore | ||
| 1022 | + Use this method when the `asyncLocalStorage` is not in use anymore | ||
| 1023 | 1023 | in the current process. | |
| 1024 | 1024 | ||
| 1025 | 1025 | ### `asyncLocalStorage.getStore()` | |
@@ -1029,10 +1029,10 @@ added: v13.10.0 | |||
| 1029 | 1029 | ||
| 1030 | 1030 | * Returns: {any} | |
| 1031 | 1031 | ||
| 1032 | - This method returns the current store. | ||
| 1033 | - If this method is called outside of an asynchronous context initialized by | ||
| 1034 | - calling `asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()`, it will | ||
| 1035 | - return `undefined`. | ||
| 1032 | + Returns the current store. | ||
| 1033 | + If called outside of an asynchronous context initialized by | ||
| 1034 | + calling `asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()`, it | ||
| 1035 | + returns `undefined`. | ||
| 1036 | 1036 | ||
| 1037 | 1037 | ### `asyncLocalStorage.enterWith(store)` | |
| 1038 | 1038 | <!-- YAML | |
@@ -1041,7 +1041,7 @@ added: v13.11.0 | |||
| 1041 | 1041 | ||
| 1042 | 1042 | * `store` {any} | |
| 1043 | 1043 | ||
| 1044 | - This method transitions into the context for the remainder of the current | ||
| 1044 | + Transitions into the context for the remainder of the current | ||
| 1045 | 1045 | synchronous execution and then persists the store through any following | |
| 1046 | 1046 | asynchronous calls. | |
| 1047 | 1047 | ||
@@ -1061,7 +1061,7 @@ This transition will continue for the _entire_ synchronous execution. | |||
| 1061 | 1061 | This means that if, for example, the context is entered within an event | |
| 1062 | 1062 | handler subsequent event handlers will also run within that context unless | |
| 1063 | 1063 | specifically bound to another context with an `AsyncResource`. That is why | |
| 1064 | - `run` should be preferred over `enterWith` unless there are strong reasons | ||
| 1064 | + `run()` should be preferred over `enterWith()` unless there are strong reasons | ||
| 1065 | 1065 | to use the latter method. | |
| 1066 | 1066 | ||
| 1067 | 1067 | ```js | |
@@ -1088,7 +1088,7 @@ added: v13.10.0 | |||
| 1088 | 1088 | * `callback` {Function} | |
| 1089 | 1089 | * `...args` {any} | |
| 1090 | 1090 | ||
| 1091 | - This methods runs a function synchronously within a context and return its | ||
| 1091 | + Runs a function synchronously within a context and returns its | ||
| 1092 | 1092 | return value. The store is not accessible outside of the callback function or | |
| 1093 | 1093 | the asynchronous operations created within the callback. | |
| 1094 | 1094 | ||
@@ -1120,7 +1120,7 @@ added: v13.10.0 | |||
| 1120 | 1120 | * `callback` {Function} | |
| 1121 | 1121 | * `...args` {any} | |
| 1122 | 1122 | ||
| 1123 | - This methods runs a function synchronously outside of a context and return its | ||
| 1123 | + Runs a function synchronously outside of a context and returns its | ||
| 1124 | 1124 | return value. The store is not accessible within the callback function or | |
| 1125 | 1125 | the asynchronous operations created within the callback. Any `getStore()` | |
| 1126 | 1126 | call done within the callback function will always return `undefined`. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments