-
-
Notifications
You must be signed in to change notification settings - Fork 31.5k
doc: make unshift doc compliant with push doc #28953
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
readable.unshift() also allows to pass null and end stream readable.push() don't allow null when in object mode
Updated <3 |
Co-Authored-By: mscdex <mscdex@users.noreply.github.com>
doc/api/stream.md
Outdated
read queue. For streams not operating in object mode, `chunk` must be a | ||
string, `Buffer` or `Uint8Array`. For object mode streams, `chunk` may be | ||
any JavaScript value other than `null`. | ||
* `encoding` {string} Encoding of string chunks. Must be a valid | ||
`Buffer` encoding, such as `'utf8'` or `'ascii'`. | ||
|
||
Passing `chunk` as `null` signals the end of the stream (EOF), after which no more data can be written. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will (I hope) cause the linter to fail because it is longer than 80 characters. Word wrap at 80 chars? To run the markdown linter, you can run make lint-md
(or, if on Windows, vcbuild lint-md
).
/ping @nodejs/streams |
I made the changes (line-wrap and more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Landed in 84a6384. Thanks for the contribution! 🎉 |
readable.unshift() also allows to pass null and end stream PR-URL: nodejs#28953 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
readable.unshift() also allows to pass null and end stream PR-URL: #28953 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
As
readable.unshift()
share implementation withreadable.push()
it makes sense to make the doc similar.Checklist