Skip to content

Commit

Permalink
doc: clarify description of readable.push() method
Browse files Browse the repository at this point in the history
PR-URL: #29687
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Beth Griggs <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
  • Loading branch information
ImHype authored and Trott committed Sep 27, 2019
1 parent 7223ce2 commit 63c0f15
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 63c0f15

Please sign in to comment.