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 targos committed Oct 1, 2019
1 parent d258e02 commit 1303e35
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 @@ -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
Expand Down

0 comments on commit 1303e35

Please sign in to comment.