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>
This commit is contained in:
Matteo Collina authored and James M Snell committed 2017-06-05 12:27:52 -07:00
1 parent 641979b213
commit 44c8ea32df
1 file changed
+2 -1
+2 -1
View File
@@ -768,7 +768,8 @@ end
```
*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()
<!-- YAML