diff options
author | Rich Trott <rtrott@gmail.com> | 2019-10-25 01:19:07 +0300 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2019-10-27 02:33:24 +0300 |
commit | 72346bd8d43477273419049ab68a5c6611480a92 (patch) | |
tree | 5519d5ba59ed5d9764de18990eff72f152faafd9 /doc/api/events.md | |
parent | ab78d4df34a7698c45fca0b81300fd02fc4add7b (diff) |
doc: remove "it is important to" phrasing
Instead of telling someone "It is important to do X", just tell them to
"Do X."
PR-URL: https://github.com/nodejs/node/pull/30108
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'doc/api/events.md')
-rw-r--r-- | doc/api/events.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/api/events.md b/doc/api/events.md index 5eeab1856b7..ec6f6086090 100644 --- a/doc/api/events.md +++ b/doc/api/events.md @@ -43,7 +43,7 @@ myEmitter.emit('event'); ## Passing arguments and `this` to listeners The `eventEmitter.emit()` method allows an arbitrary set of arguments to be -passed to the listener functions. It is important to keep in mind that when +passed to the listener functions. Keep in mind that when an ordinary listener function is called, the standard `this` keyword is intentionally set to reference the `EventEmitter` instance to which the listener is attached. @@ -77,8 +77,8 @@ myEmitter.emit('event', 'a', 'b'); ## Asynchronous vs. Synchronous The `EventEmitter` calls all listeners synchronously in the order in which -they were registered. This is important to ensure the proper sequencing of -events and to avoid race conditions or logic errors. When appropriate, +they were registered. This ensures the proper sequencing of +events and helps avoid race conditions and logic errors. When appropriate, listener functions can switch to an asynchronous mode of operation using the `setImmediate()` or `process.nextTick()` methods: |