Skip to content

Commit

Permalink
doc,stream: clarify 'data', pipe() and 'readable'
Browse files Browse the repository at this point in the history
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: #11587
PR-URL: #13432
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
mcollina authored and MylesBorins committed Jul 17, 2017
1 parent cc492c3 commit 0d35bcd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,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
Expand Down

0 comments on commit 0d35bcd

Please sign in to comment.