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
Matteo Collina 7 years ago
parent
commit
5ca836c192
  1. 3
      doc/api/stream.md

3
doc/api/stream.md

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

Loading…
Cancel
Save