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: nodejs#11587
  • Loading branch information
mcollina committed Jun 3, 2017
1 parent 716e9e0 commit 6d8c970
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 @@ -754,7 +754,8 @@ end
```

*Note*: In general, the `readable.pipe()` and `'data'` event mechanisms are
preferred over the use of the `'readable'` event.
easier to understand compared to the `'readable'` event.
However, handling `'readable'` might result in increased throughput.

##### readable.isPaused()
<!-- YAML
Expand Down

0 comments on commit 6d8c970

Please sign in to comment.