Skip to content

Commit 75637e6

Browse files
Saleemaddaleax
Saleem
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 7166415 commit 75637e6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/api/stream.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2554,7 +2554,7 @@ method. This will be called when there is no more written data to be consumed,
25542554
but before the [`'end'`][] event is emitted signaling the end of the
25552555
[`Readable`][] stream.
25562556

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

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

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

26002600
```js
26012601
transform.prototype._transform = function(data, encoding, callback) {

0 commit comments

Comments
 (0)