diff options
author | imhype <543717080@qq.com> | 2019-09-25 14:02:21 +0800 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2019-09-27 15:36:00 -0700 |
commit | 63c0f15a8286ffb1fa99d4eb5faebfd844d8451a (patch) | |
tree | 080735bf9dbd808ba89e5e1068698d7e986cd656 /doc | |
parent | 7223ce2a9c0fe250e199327ece14d2fcaea34bb1 (diff) | |
download | android-node-v8-63c0f15a8286ffb1fa99d4eb5faebfd844d8451a.tar.gz android-node-v8-63c0f15a8286ffb1fa99d4eb5faebfd844d8451a.tar.bz2 android-node-v8-63c0f15a8286ffb1fa99d4eb5faebfd844d8451a.zip |
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>
Diffstat (limited to 'doc')
-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 3822e8ed21..d4dbe54dbc 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -2148,8 +2148,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 |