Skip to content

Commit

Permalink
doc: document the 'pause' and 'resume' events
Browse files Browse the repository at this point in the history
PR-URL: #26999
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Signed-off-by: Beth Griggs <Bethany.Griggs@uk.ibm.com>
  • Loading branch information
lpinca authored and BethGriggs committed Apr 9, 2019
1 parent 57ced2d commit 7eb73d3
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,14 @@ to push an invalid chunk of data.

The listener callback will be passed a single `Error` object.

##### Event: 'pause'
<!-- YAML
added: v0.9.4
-->

The `'pause'` event is emitted when [`stream.pause()`][stream-pause] is called
and `readableFlowing` is not `false`.

##### Event: 'readable'
<!-- YAML
added: v0.9.4
Expand Down Expand Up @@ -868,6 +876,14 @@ If there are `'data'` listeners when `'readable'` is removed, the stream
will start flowing, i.e. `'data'` events will be emitted without calling
`.resume()`.

##### Event: 'resume'
<!-- YAML
added: v0.9.4
-->

The `'resume'` event is emitted when [`stream.resume()`][stream-resume] is
called and `readableFlowing` is not `true`.

##### readable.destroy([error])
<!-- YAML
added: v8.0.0
Expand Down

0 comments on commit 7eb73d3

Please sign in to comment.