doc: document the 'pause' and 'resume' events

PR-URL: https://github.com/nodejs/node/pull/26999
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
pull/27459/head
Luigi Pinca 2019-03-29 21:42:02 +01:00 committed by Daniel Bevenius
parent 9e960175d1
commit 98b5ba840e
1 changed files with 16 additions and 0 deletions

View File

@ -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
@ -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