Browse Source

doc,stream: clarify 'data', pipe() and 'readable'

We stated that 'data' and pipe() are preferred over 'readable'.
This commit clarifies that 'data' and pipe() are easier to understand,
but 'readable' might result in increased throughput.

Fixes: https://github.com/nodejs/node/issues/11587
PR-URL: https://github.com/nodejs/node/pull/13432
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
v6.x
Matteo Collina 8 years ago
committed by Myles Borins
parent
commit
0d35bcdf84
No known key found for this signature in database GPG Key ID: 933B01F40B5CA946
  1. 3
      doc/api/stream.md

3
doc/api/stream.md

@ -739,7 +739,8 @@ end
``` ```
*Note*: In general, the `readable.pipe()` and `'data'` event mechanisms are *Note*: In general, the `readable.pipe()` and `'data'` event mechanisms are
preferred over the use of the `'readable'` event. easier to understand than the `'readable'` event.
However, handling `'readable'` might result in increased throughput.
##### readable.isPaused() ##### readable.isPaused()
<!-- YAML <!-- YAML

Loading…
Cancel
Save