From 1303e3551f305cfd5ba068eb47b6fd1e7d728a2f Mon Sep 17 00:00:00 2001 From: imhype <543717080@qq.com> Date: Wed, 25 Sep 2019 14:02:21 +0800 Subject: [PATCH] doc: clarify description of `readable.push()` method PR-URL: https://github.com/nodejs/node/pull/29687 Reviewed-By: James M Snell Reviewed-By: Matteo Collina Reviewed-By: Beth Griggs Reviewed-By: Trivikram Kamat --- doc/api/stream.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/stream.md b/doc/api/stream.md index 5c4c93886b9891..eb4b0b82740a8f 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -2149,8 +2149,8 @@ class SourceWrapper extends Readable { } ``` -The `readable.push()` method is intended be called only by `Readable` -implementers, and only from within the `readable._read()` method. +The `readable.push()` method is used to push the content +into the internal buffer. It can be driven by the `readable._read()` method. For streams not operating in object mode, if the `chunk` parameter of `readable.push()` is `undefined`, it will be treated as empty string or