From 44c8ea32df2a922a0efb11e253eb131cf438a895 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 PR-URL: https://github.com/nodejs/node/pull/13432 Reviewed-By: Rich Trott Reviewed-By: Anna Henningsen Reviewed-By: Luigi Pinca --- 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 3836056d81c66e..ca37243c90e62d 100644 --- a/doc/api/stream.md +++ b/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()