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 5616f22

Browse filesBrowse files
ronagtargos
authored andcommitted
doc: clarify readable.unshift null/EOF
PR-URL: #29950 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
1 parent 45c5ad7 commit 5616f22
Copy full SHA for 5616f22

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

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

‎doc/api/stream.md‎

Copy file name to clipboardExpand all lines: doc/api/stream.md
+4-2Lines changed: 4 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1284,8 +1284,10 @@ changes:
12841284
* `encoding` {string} Encoding of string chunks. Must be a valid
12851285
`Buffer` encoding, such as `'utf8'` or `'ascii'`.
12861286

1287-
Passing `chunk` as `null` signals the end of the stream (EOF), after which no
1288-
more data can be written.
1287+
Passing `chunk` as `null` signals the end of the stream (EOF) and behaves the
1288+
same as `readable.push(null)`, after which no more data can be written. The EOF
1289+
signal is put at the end of the buffer and any buffered data will still be
1290+
flushed.
12891291

12901292
The `readable.unshift()` method pushes a chunk of data back into the internal
12911293
buffer. This is useful in certain situations where a stream is being consumed by

0 commit comments

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