Skip to content

Commit 1a9d631

Browse files
Saleemjasnell
authored andcommitted
doc: use consistent naming in stream doc
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 <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 7c9df66 commit 1a9d631

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/api/stream.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2804,7 +2804,7 @@ method. This will be called when there is no more written data to be consumed,
28042804
but before the [`'end'`][] event is emitted signaling the end of the
28052805
[`Readable`][] stream.
28062806

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

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

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

28502850
```js
28512851
transform.prototype._transform = function(data, encoding, callback) {

0 commit comments

Comments
 (0)