From 0d35bcdf8432a3b119310dfcdd78bcf1f3657996 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 4b6db64aaeffd5..7987eb826501fc 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -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()