Skip to content

Commit

Permalink
doc: use consistent naming in stream doc
Browse files Browse the repository at this point in the history
Consistency of method naming

referred to as readable.push several other times in transform
documentation and also documented under readable, so makes sense
to just stick with readable.push

PR-URL: #30506
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
Saleem authored and jasnell committed Jul 3, 2020
1 parent 7c9df66 commit 1a9d631
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -2804,7 +2804,7 @@ method. This will be called when there is no more written data to be consumed,
but before the [`'end'`][] event is emitted signaling the end of the
[`Readable`][] stream.

Within the `transform._flush()` implementation, the `readable.push()` method
Within the `transform._flush()` implementation, the `transform.push()` method
may be called zero or more times, as appropriate. The `callback` function must
be called when the flush operation is complete.

Expand Down Expand Up @@ -2833,7 +2833,7 @@ methods only.
All `Transform` stream implementations must provide a `_transform()`
method to accept input and produce output. The `transform._transform()`
implementation handles the bytes being written, computes an output, then passes
that output off to the readable portion using the `readable.push()` method.
that output off to the readable portion using the `transform.push()` method.

The `transform.push()` method may be called zero or more times to generate
output from a single input chunk, depending on how much is to be output
Expand All @@ -2845,7 +2845,7 @@ The `callback` function must be called only when the current chunk is completely
consumed. The first argument passed to the `callback` must be an `Error` object
if an error occurred while processing the input or `null` otherwise. If a second
argument is passed to the `callback`, it will be forwarded on to the
`readable.push()` method. In other words, the following are equivalent:
`transform.push()` method. In other words, the following are equivalent:

```js
transform.prototype._transform = function(data, encoding, callback) {
Expand Down

0 comments on commit 1a9d631

Please sign in to comment.