-
Notifications
You must be signed in to change notification settings - Fork 30k
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: improvements to console.markdown copy #5225
Conversation
@@ -9,8 +9,8 @@ The module exports two specific components: | |||
|
|||
* A `Console` class with methods such as `console.log()`, `console.error()` and | |||
`console.warn()` that can be used to write to any Node.js stream. | |||
* A global `console` instance configured to write to `stdout` and `stderr`. | |||
Because this object is global, it can be used without calling | |||
* A global `console` instance configured to write to process `stdout` and |
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.
Maybe this should instead be:
... to write to `process.stdout` and `process.stderr`.
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.
Yep, I thought so too, but was waiting for this comment 😄
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.
Done
`require('console')`. | ||
* A global `console` instance configured to write to [`process.stdout`][] and | ||
[`process.stderr`][]. Because this object is global, it can be used without | ||
calling `require('console')`. |
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.
Hmm, multiple places in this file refer to the standard output streams as just stdout
, stderr
. I think it's better to keep this paragraph unchanged for consistency.
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.
@mscdex your thoughts? I agree with both of you, to say, so not sure. From one point, it's OK to use stdout
or "process stdout
" because, it's how it is. Other point is let people understand that global console uses process.stdout
and process.stderr
Writable streams. Both points are good to me.
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.
I guess I don't really mind either way, as long as it's all consistent.
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.
@mscdex @silverwind Fixed.
Fix missing links. Fix styling of printf() - once #5073 lands, link to man page will be auto-generated. Fix several typos.
LGTM |
1 similar comment
LGTM |
Landed in fb502ef. |
Fix missing links. Fix styling of printf() - once #5073 lands, link to man page will be auto-generated. Fix several typos. PR-URL: #5225 Reviewed-By: Roman Reiss <[email protected]> Reviewed-By: James M Snell <[email protected]>
Fix missing links. Fix styling of printf() - once #5073 lands, link to man page will be auto-generated. Fix several typos. PR-URL: #5225 Reviewed-By: Roman Reiss <[email protected]> Reviewed-By: James M Snell <[email protected]>
Fix missing links. Fix styling of printf() - once #5073 lands, link to man page will be auto-generated. Fix several typos. PR-URL: #5225 Reviewed-By: Roman Reiss <[email protected]> Reviewed-By: James M Snell <[email protected]>
Fix missing links. Fix styling of printf() - once #5073 lands, link to man page will be auto-generated. Fix several typos. PR-URL: #5225 Reviewed-By: Roman Reiss <[email protected]> Reviewed-By: James M Snell <[email protected]>
Fix missing links. Fix styling of printf() - once #5073 lands, link to man page will be auto-generated. Fix several typos. PR-URL: #5225 Reviewed-By: Roman Reiss <[email protected]> Reviewed-By: James M Snell <[email protected]>
Fix missing links. Fix styling of printf() - once #5073 lands, link to man page will be auto-generated. Fix several typos.