Skip to content

Commit 0a944a4

Browse files
dev-scriptBethGriggs
authored andcommittedDec 15, 2020
doc,stream: write(chunk, encoding, cb) encoding can be null
In stream write encoding can be null. Fixes: #33715 PR-URL: #35372 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent c4e17cf commit 0a944a4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎doc/api/stream.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -596,8 +596,8 @@ changes:
596596
not operating in object mode, `chunk` must be a string, `Buffer` or
597597
`Uint8Array`. For object mode streams, `chunk` may be any JavaScript value
598598
other than `null`.
599-
* `encoding` {string} The encoding, if `chunk` is a string. **Default:** `'utf8'`
600-
* `callback` {Function} Callback for when this chunk of data is flushed
599+
* `encoding` {string|null} The encoding, if `chunk` is a string. **Default:** `'utf8'`
600+
* `callback` {Function} Callback for when this chunk of data is flushed.
601601
* Returns: {boolean} `false` if the stream wishes for the calling code to
602602
wait for the `'drain'` event to be emitted before continuing to write
603603
additional data; otherwise `true`.

0 commit comments

Comments
 (0)
Please sign in to comment.