From 92e83760d1b1bd54598a4f2fa58d0f4f0689f109 Mon Sep 17 00:00:00 2001 From: Saleem Date: Sat, 16 Nov 2019 18:13:18 -0500 Subject: [PATCH 1/2] 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 --- doc/api/stream.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/stream.md b/doc/api/stream.md index 066d85adc493e1..4d6e990f98d551 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -2534,7 +2534,7 @@ 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. -The `transform.push()` method may be called zero or more times to generate +The `readable.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 as a result of the chunk. From 84c9855c94cbd27b80016652dedbdfac11431992 Mon Sep 17 00:00:00 2001 From: Saleem Date: Sun, 15 Mar 2020 07:48:18 -0400 Subject: [PATCH 2/2] Consistently name push method in transform section --- doc/api/stream.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/api/stream.md b/doc/api/stream.md index 4d6e990f98d551..f070c68a0e5266 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -2503,7 +2503,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. @@ -2532,9 +2532,9 @@ 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 `readable.push()` method may be called zero or more times to generate +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 as a result of the chunk. @@ -2544,7 +2544,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) {