Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1aa798d

Browse filesBrowse files
rafasofizadaruyadorno
authored andcommitted
doc: clarify transform._transform() callback argument logic
Clarify that `transform._transform()` callback second argument is used only if the first argument is `null`, i.e. no error occured processing the chunk. PR-URL: #48680 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
1 parent d723e87 commit 1aa798d
Copy full SHA for 1aa798d

File tree

Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Open diff view settings
Collapse file

‎doc/api/stream.md‎

Copy file name to clipboardExpand all lines: doc/api/stream.md
+2-1Lines changed: 2 additions & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -4507,7 +4507,8 @@ The `callback` function must be called only when the current chunk is completely
45074507
consumed. The first argument passed to the `callback` must be an `Error` object
45084508
if an error occurred while processing the input or `null` otherwise. If a second
45094509
argument is passed to the `callback`, it will be forwarded on to the
4510-
`transform.push()` method. In other words, the following are equivalent:
4510+
`transform.push()` method, but only if the first argument is falsy. In other
4511+
words, the following are equivalent:
45114512

45124513
```js
45134514
transform.prototype._transform = function(data, encoding, callback) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.