Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: make unshift doc compliant with push doc #28953

Closed
wants to merge 3 commits into from

Conversation

@EduardoRFS
Copy link
Contributor

commented Aug 3, 2019

As readable.unshift() share implementation with readable.push() it makes sense to make the doc similar.

Checklist
doc/api/stream.md Outdated Show resolved Hide resolved

@EduardoRFS EduardoRFS force-pushed the EduardoRFS:patch-1 branch from 2c854b3 to c580523 Aug 4, 2019

doc: make unshift doc compliant with push doc
readable.unshift() also allows to pass null and end stream

readable.push() don't allow null when in object mode

@EduardoRFS EduardoRFS force-pushed the EduardoRFS:patch-1 branch from c580523 to 6bb3112 Aug 4, 2019

@EduardoRFS EduardoRFS changed the title doc: unshift doc when chunk is null doc: make unshift doc compliant with push doc Aug 4, 2019

@EduardoRFS

This comment has been minimized.

Copy link
Contributor Author

commented Aug 4, 2019

Updated <3

doc/api/stream.md Outdated Show resolved Hide resolved
Update doc/api/stream.md
Co-Authored-By: mscdex <mscdex@users.noreply.github.com>
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.

This comment has been minimized.

Copy link
@Trott

Trott Aug 6, 2019

Member

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).

doc/api/stream.md Show resolved Hide resolved
@Trott

This comment has been minimized.

Copy link
Member

commented Aug 6, 2019

@Trott

This comment has been minimized.

Copy link
Member

commented Aug 6, 2019

I made the changes (line-wrap and more null clarification) and pushed up to the branch. I kept my changes in a separate fixup commit so they can be removed easily. @mscdex LGTY?

@Trott

This comment has been minimized.

@jasnell
jasnell approved these changes Aug 7, 2019
@Trott
Trott approved these changes Aug 7, 2019
@mcollina
Copy link
Member

left a comment

LGTM

@Trott

This comment has been minimized.

Copy link
Member

commented Aug 7, 2019

Landed in 84a6384.

Thanks for the contribution! 🎉

@Trott Trott closed this Aug 7, 2019

Trott added a commit to Trott/io.js that referenced this pull request Aug 7, 2019
doc: make unshift doc compliant with push doc
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>
targos added a commit that referenced this pull request Aug 19, 2019
doc: make unshift doc compliant with push doc
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>
targos added a commit that referenced this pull request Aug 19, 2019
doc: make unshift doc compliant with push doc
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>
@targos targos referenced this pull request Aug 19, 2019
JeniaBR added a commit to JeniaBR/node that referenced this pull request Sep 11, 2019
doc: make unshift doc compliant with push doc
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>
JeniaBR added a commit to JeniaBR/node that referenced this pull request Sep 11, 2019
doc: make unshift doc compliant with push doc
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.