Skip to content

Commit 232a486

Browse files
TrottMylesBorins
authored andcommitted
doc: fix common typo involving one-time listeners
Our docs use both "one time listener" and "one-time listener". The second is more correct. Standardize on that. PR-URL: #17502 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Jon Moss <[email protected]> Reviewed-By: Minwoo Jung <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 07df234 commit 232a486

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

doc/api/events.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ added: v0.3.0
409409
* `eventName` {any} The name of the event.
410410
* `listener` {Function} The callback function
411411

412-
Adds a **one time** `listener` function for the event named `eventName`. The
412+
Adds a **one-time** `listener` function for the event named `eventName`. The
413413
next time `eventName` is triggered, this listener is removed and then invoked.
414414

415415
```js
@@ -464,7 +464,7 @@ added: v6.0.0
464464
* `eventName` {any} The name of the event.
465465
* `listener` {Function} The callback function
466466

467-
Adds a **one time** `listener` function for the event named `eventName` to the
467+
Adds a **one-time** `listener` function for the event named `eventName` to the
468468
*beginning* of the listeners array. The next time `eventName` is triggered, this
469469
listener is removed, and then invoked.
470470

doc/api/http.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1785,7 +1785,7 @@ This function allows one to transparently issue requests.
17851785
string, it is automatically parsed with [`url.parse()`][]. If it is a [`URL`][]
17861786
object, it will be automatically converted to an ordinary `options` object.
17871787

1788-
The optional `callback` parameter will be added as a one time listener for
1788+
The optional `callback` parameter will be added as a one-time listener for
17891789
the [`'response'`][] event.
17901790

17911791
`http.request()` returns an instance of the [`http.ClientRequest`][]

doc/api/net.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,7 @@ socket.on('timeout', () => {
802802

803803
If `timeout` is 0, then the existing idle timeout is disabled.
804804

805-
The optional `callback` parameter will be added as a one time listener for the
805+
The optional `callback` parameter will be added as a one-time listener for the
806806
[`'timeout'`][] event.
807807

808808
### socket.unref()

0 commit comments

Comments
 (0)