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>
This commit is contained in:
imhype 2019-09-25 14:02:21 +08:00 committed by Rich Trott
parent 7223ce2a9c
commit 63c0f15a82

View File

@ -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