Skip to content

Commit 445c911

Browse files
TrottMylesBorins
authored andcommitted
doc: edit for concision
This removes some wordy phrases (notably "it is important to note that"). PR-URL: #17891 Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
1 parent 3fd6581 commit 445c911

File tree

6 files changed

+25
-35
lines changed

6 files changed

+25
-35
lines changed

doc/api/async_hooks.md

+5-6
Original file line numberDiff line numberDiff line change
@@ -484,9 +484,8 @@ fs.open(path, 'r', (err, fd) => {
484484
});
485485
```
486486

487-
It is important to note that the ID returned fom `executionAsyncId()` is related
488-
to execution timing, not causality (which is covered by `triggerAsyncId()`). For
489-
example:
487+
The ID returned fom `executionAsyncId()` is related to execution timing, not
488+
causality (which is covered by `triggerAsyncId()`). For example:
490489

491490
```js
492491
const server = net.createServer(function onConnection(conn) {
@@ -538,9 +537,9 @@ own resources.
538537

539538
The `init` hook will trigger when an `AsyncResource` is instantiated.
540539

541-
*Note*: It is important that `before`/`after` calls are unwound
542-
in the same order they are called. Otherwise an unrecoverable exception
543-
will occur and the process will abort.
540+
*Note*: `before` and `after` calls must be unwound in the same order that they
541+
are called. Otherwise, an unrecoverable exception will occur and the process
542+
will abort.
544543

545544
The following is an overview of the `AsyncResource` API.
546545

doc/api/errors.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -312,11 +312,10 @@ location information will be displayed for that frame. Otherwise, the
312312
determined function name will be displayed with location information appended
313313
in parentheses.
314314

315-
It is important to note that frames are **only** generated for JavaScript
316-
functions. If, for example, execution synchronously passes through a C++ addon
317-
function called `cheetahify`, which itself calls a JavaScript function, the
318-
frame representing the `cheetahify` call will **not** be present in the stack
319-
traces:
315+
Frames are only generated for JavaScript functions. If, for example, execution
316+
synchronously passes through a C++ addon function called `cheetahify` which
317+
itself calls a JavaScript function, the frame representing the `cheetahify` call
318+
will not be present in the stack traces:
320319

321320
```js
322321
const cheetahify = require('./native-binding.node');

doc/api/process.md

+7-12
Original file line numberDiff line numberDiff line change
@@ -374,16 +374,11 @@ process.on('SIGINT', handle);
374374
process.on('SIGTERM', handle);
375375
```
376376

377-
*Note*: An easy way to send the `SIGINT` signal is with `<Ctrl>-C` in most
378-
terminal programs.
379-
380-
It is important to take note of the following:
381-
382377
* `SIGUSR1` is reserved by Node.js to start the [debugger][]. It's possible to
383378
install a listener but doing so will _not_ stop the debugger from starting.
384379
* `SIGTERM` and `SIGINT` have default handlers on non-Windows platforms that
385-
resets the terminal mode before exiting with code `128 + signal number`. If
386-
one of these signals has a listener installed, its default behavior will be
380+
reset the terminal mode before exiting with code `128 + signal number`. If one
381+
of these signals has a listener installed, its default behavior will be
387382
removed (Node.js will no longer exit).
388383
* `SIGPIPE` is ignored by default. It can have a listener installed.
389384
* `SIGHUP` is generated on Windows when the console window is closed, and on
@@ -394,7 +389,7 @@ It is important to take note of the following:
394389
installed its default behavior will be removed.
395390
* `SIGTERM` is not supported on Windows, it can be listened on.
396391
* `SIGINT` from the terminal is supported on all platforms, and can usually be
397-
generated with `CTRL+C` (though this may be configurable). It is not generated
392+
generated with `<Ctrl>+C` (though this may be configurable). It is not generated
398393
when terminal raw mode is enabled.
399394
* `SIGBREAK` is delivered on Windows when `<Ctrl>+<Break>` is pressed, on
400395
non-Windows platforms it can be listened on, but there is no way to send or
@@ -989,10 +984,10 @@ process.exit(1);
989984

990985
The shell that executed Node.js should see the exit code as `1`.
991986

992-
It is important to note that calling `process.exit()` will force the process to
993-
exit as quickly as possible *even if there are still asynchronous operations
994-
pending* that have not yet completed fully, *including* I/O operations to
995-
`process.stdout` and `process.stderr`.
987+
Calling `process.exit()` will force the process to exit as quickly as possible
988+
even if there are still asynchronous operations pending that have not yet
989+
completed fully, including I/O operations to `process.stdout` and
990+
`process.stderr`.
996991

997992
In most situations, it is not actually necessary to call `process.exit()`
998993
explicitly. The Node.js process will exit on its own *if there is no additional

doc/api/repl.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,8 @@ $ node repl_test.js
114114
'message'
115115
```
116116

117-
It is important to note that context properties are *not* read-only by default.
118-
To specify read-only globals, context properties must be defined using
119-
`Object.defineProperty()`:
117+
Context properties are not read-only by default. To specify read-only globals,
118+
context properties must be defined using `Object.defineProperty()`:
120119

121120
```js
122121
const repl = require('repl');

doc/api/stream.md

+5-6
Original file line numberDiff line numberDiff line change
@@ -1426,12 +1426,11 @@ successfully or failed with an error. The first argument passed to the
14261426
`callback` must be the `Error` object if the call failed or `null` if the
14271427
write succeeded.
14281428

1429-
It is important to note that all calls to `writable.write()` that occur between
1430-
the time `writable._write()` is called and the `callback` is called will cause
1431-
the written data to be buffered. Once the `callback` is invoked, the stream will
1432-
emit a [`'drain'`][] event. If a stream implementation is capable of processing
1433-
multiple chunks of data at once, the `writable._writev()` method should be
1434-
implemented.
1429+
All calls to `writable.write()` that occur between the time `writable._write()`
1430+
is called and the `callback` is called will cause the written data to be
1431+
buffered. Once the `callback` is invoked, the stream will emit a [`'drain'`][]
1432+
event. If a stream implementation is capable of processing multiple chunks of
1433+
data at once, the `writable._writev()` method should be implemented.
14351434

14361435
If the `decodeStrings` property is set in the constructor options, then
14371436
`chunk` may be a string rather than a Buffer, and `encoding` will

doc/api/vm.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,8 @@ changes:
8787
depending on whether code cache data is produced successfully.
8888

8989
Creating a new `vm.Script` object compiles `code` but does not run it. The
90-
compiled `vm.Script` can be run later multiple times. It is important to note
91-
that the `code` is not bound to any global object; rather, it is bound before
92-
each run, just for that run.
90+
compiled `vm.Script` can be run later multiple times. The `code` is not bound to
91+
any global object; rather, it is bound before each run, just for that run.
9392

9493
### script.runInContext(contextifiedSandbox[, options])
9594
<!-- YAML

0 commit comments

Comments
 (0)