From 6d8c9701c7ea589612d843a0d46b4c55b4f9acb2 Mon Sep 17 00:00:00 2001 From: Matteo Collina Date: Sat, 3 Jun 2017 11:25:42 +0200 Subject: [PATCH] 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 --- doc/api/stream.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/api/stream.md b/doc/api/stream.md index 0f8420e3dad71b..c513c8ddab1c7c 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -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()