-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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: replace uses of you
and other style nits
#12673
Conversation
doc/api/cluster.md
Outdated
@@ -713,8 +713,8 @@ added: v0.11.2 | |||
|
|||
The scheduling policy, either `cluster.SCHED_RR` for round-robin or | |||
`cluster.SCHED_NONE` to leave it to the operating system. This is a | |||
global setting and effectively frozen once you spawn the first worker | |||
or call `cluster.setupMaster()`, whatever comes first. | |||
global setting and effectively frozen once wither the first worker is spawned, |
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.
wither -> either?
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.
heh... yes, is should be either
d801879
to
3213cfd
Compare
doc/api/globals.md
Outdated
In browsers, the top-level scope is the global scope. This means that | ||
`var something`, within the browser, will define a new global variable. In | ||
Node.js this is different. The top-level scope is not the global scope; | ||
`var something` inside an Node.js module will be local to that module. |
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.
an Node.js -> a Node.js?
doc/api/modules.md
Outdated
may itself have dependencies, and in some cases, these dependencies may even | ||
collide or form cycles. | ||
Packages can depend on one another. In order to install package `foo`, it | ||
may be necessary to install a specific version of package `bar`. The `bar` |
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.
Two spaces in succession.
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.
Some nits (most of them from the existing docs, but while you're there)
doc/api/cluster.md
Outdated
responsibility to manage the worker pool for your application's needs. | ||
will be dropped and new connections will be refused. Node.js does not | ||
automatically manage the number of workers, however. It is the application's | ||
responsibility to manage the worker pool based on it's own needs. |
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.
it's
-> its
doc/api/cluster.md
Outdated
created. It is disconnected after the `'disconnect'` event is emitted. | ||
This function returns `true` if the worker is connected to its master via its | ||
IPC channel, `false` otherwise. A worker is connected to its master after it's | ||
been created. It is disconnected after the `'disconnect'` event is emitted. |
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.
it's been
-> it has been
The boolean `worker.exitedAfterDisconnect` lets you distinguish between voluntary | ||
and accidental exit, the master may choose not to respawn a worker based on | ||
this value. | ||
The boolean `worker.exitedAfterDisconnect` allows distinguishing between |
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.
allows distinguishs
-> is used to distinguish
allows
suggests that's just one of the things it can do right?
doc/api/cluster.md
Outdated
@@ -469,7 +467,7 @@ An alias to [`worker.exitedAfterDisconnect`][]. | |||
|
|||
Set by calling `.kill()` or `.disconnect()`. Until then, it is `undefined`. | |||
|
|||
The boolean `worker.suicide` lets you distinguish between voluntary | |||
The boolean `worker.suicide` allows distinguishs between voluntary |
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.
allows distinguishs
-> is used to distinguish
as above...
doc/api/cluster.md
Outdated
After calling `listen()` from a worker, when the `'listening'` event is emitted on | ||
the server, a `'listening'` event will also be emitted on `cluster` in the master. | ||
After calling `listen()` from a worker, when the `'listening'` event is emitted | ||
on the server, a `'listening'` event will also be emitted on `cluster` in the |
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.
server, a
-> server a
I think that's easier to parse, happy to be disagreed with though.
doc/api/modules.md
Outdated
@@ -203,8 +200,8 @@ executed multiple times. This is an important feature. With it, | |||
"partially done" objects can be returned, thus allowing transitive | |||
dependencies to be loaded even when they would cause cycles. | |||
|
|||
If you want to have a module execute code multiple times, then export a | |||
function, and call that function. | |||
To have a module execute code multiple times, then export a function, and call |
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.
then
doc/api/modules.md
Outdated
@@ -297,8 +294,8 @@ a done | |||
in main, a.done=true, b.done=true | |||
``` | |||
|
|||
If you have cyclic module dependencies in your program, make sure to | |||
plan accordingly. | |||
Careful planning is required to allow cyclic module dependencies within an |
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.
to allow cyclic module dependencies to what? The sentence as is suggests that they won't be allowed unless you plan carefully, but AIUI what will happen is that the application just won't work correctly.
Maybe:
to allow cyclic module dependencies to work correctly within an application.
doc/api/modules.md
Outdated
These are mostly for historic reasons. | ||
|
||
*Note*: It is strongly encouraged to place dependencies locally in | ||
`node_modules` folders. These will be loaded faster, and more reliably. |
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 locally in
-> node_modules
folders in the local
node_modules
folder
doc/api/repl.md
Outdated
@@ -499,9 +499,9 @@ by the `NODE_REPL_HISTORY` variable, as documented in the | |||
|
|||
For advanced line-editors, start Node.js with the environmental variable | |||
`NODE_NO_READLINE=1`. This will start the main and debugger REPL in canonical | |||
terminal settings which will allow you to use with `rlwrap`. | |||
terminal settings which will allow use with `rlwrap`. |
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 settings which
-> settings, which
doc/api/net.md
Outdated
@@ -650,7 +650,7 @@ added: v0.9.6 | |||
--> | |||
|
|||
The string representation of the local IP address the remote client is | |||
connecting on. For example, if you are listening on `'0.0.0.0'` and the | |||
connecting on. For example, when listening on `'0.0.0.0'` and the |
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 don't think when...and
works here. Can we be more specific about what is listening on '0.0.0.0'
?
Sorry for not giving a concrete suggestion, I can't think of a good way to say this.
Replace uses of the pronouns `you` and `your` throughout the docs + other minor style nits
3213cfd
to
83acb55
Compare
@gibfahn ... updated! |
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.
Thanks, LGTM. Especially impressed by how you fixed the bits where I basically said "this is bad, I have no constructive suggestions, please make better..."
Replace uses of the pronouns `you` and `your` throughout the docs + other minor style nits PR-URL: #12673 Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]>
Landed in 71f22c8 |
Should this be backported to This looks reasonably easy to backport. |
Replace uses of the pronouns
you
andyour
throughout the docs + other minor style nitsChecklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
doc