diff options
author | imhype <543717080@qq.com> | 2019-09-25 14:02:21 +0800 |
---|---|---|
committer | Michaƫl Zasso <targos@protonmail.com> | 2019-10-01 14:39:44 +0200 |
commit | 1303e3551f305cfd5ba068eb47b6fd1e7d728a2f (patch) | |
tree | 94f3dcdd9de3aaa9ab95236b1e762d9be41db2cd | |
parent | d258e0242cf5f735b1c338bd45be687fc4ea0328 (diff) | |
download | node-new-1303e3551f305cfd5ba068eb47b6fd1e7d728a2f.tar.gz |
doc: clarify description of `readable.push()` method
PR-URL: https://github.com/nodejs/node/pull/29687
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
-rw-r--r-- | doc/api/stream.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/api/stream.md b/doc/api/stream.md index 5c4c93886b..eb4b0b8274 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 |