Skip to content

Commit

Permalink
doc: remove **Note:** tags
Browse files Browse the repository at this point in the history
Remove the various **Note:** prefixes throughout the docs.

PR-URL: #18592
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
  • Loading branch information
jasnell authored and targos committed Mar 24, 2018
1 parent 742b304 commit 9c67262
Show file tree
Hide file tree
Showing 32 changed files with 491 additions and 518 deletions.
2 changes: 1 addition & 1 deletion doc/api/addons.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ specifically to compile Node.js Addons.
}
```

*Note*: A version of the `node-gyp` utility is bundled and distributed with
A version of the `node-gyp` utility is bundled and distributed with
Node.js as part of `npm`. This version is not made directly available for
developers to use and is intended only to support the ability to use the
`npm install` command to compile and install Addons. Developers who wish to
Expand Down
10 changes: 5 additions & 5 deletions doc/api/async_hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@ property, set to `true` if the promise has a parent promise, and `false`
otherwise. For example, in the case of `b = a.then(handler)`, `a` is considered
a parent Promise of `b`. Here, `b` is considered a chained promise.

*Note*: In some cases the resource object is reused for performance reasons,
it is thus not safe to use it as a key in a `WeakMap` or add properties to it.
In some cases the resource object is reused for performance reasons, it is
thus not safe to use it as a key in a `WeakMap` or add properties to it.

###### Asynchronous context example

Expand Down Expand Up @@ -377,9 +377,9 @@ destroy: 9
destroy: 5
```

*Note*: As illustrated in the example, `executionAsyncId()` and `execution`
each specify the value of the current execution context; which is delineated by
calls to `before` and `after`.
As illustrated in the example, `executionAsyncId()` and `execution` each specify
the value of the current execution context; which is delineated by calls to
`before` and `after`.

Only using `execution` to graph resource allocation results in the following:

Expand Down
18 changes: 9 additions & 9 deletions doc/api/buffer.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,10 @@ The character encodings currently supported by Node.js include:

* `'hex'` - Encode each byte as two hexadecimal characters.

*Note*: Today's browsers follow the [WHATWG Encoding Standard][] which aliases
both 'latin1' and ISO-8859-1 to win-1252. This means that while doing something
like `http.get()`, if the returned charset is one of those listed in the WHATWG
specification it is possible that the server actually returned
Modern Web browsers follow the [WHATWG Encoding Standard][] which aliases
both `'latin1'` and `'ISO-8859-1'` to `'win-1252'`. This means that while doing
something like `http.get()`, if the returned charset is one of those listed in
the WHATWG specification it is possible that the server actually returned
win-1252-encoded data, and using `'latin1'` encoding may incorrectly decode the
characters.

Expand Down Expand Up @@ -681,9 +681,9 @@ Returns the actual byte length of a string. This is not the same as
[`String.prototype.length`] since that returns the number of *characters* in
a string.

*Note*: For `'base64'` and `'hex'`, this function assumes valid input. For
strings that contain non-Base64/Hex-encoded data (e.g. whitespace), the return
value might be greater than the length of a `Buffer` created from the string.
For `'base64'` and `'hex'`, this function assumes valid input. For strings that
contain non-Base64/Hex-encoded data (e.g. whitespace), the return value might be
greater than the length of a `Buffer` created from the string.

Example:

Expand Down Expand Up @@ -1815,8 +1815,8 @@ offset and cropped by the `start` and `end` indices.
Specifying `end` greater than [`buf.length`] will return the same result as
that of `end` equal to [`buf.length`].

*Note*: Modifying the new `Buffer` slice will modify the memory in the
original `Buffer` because the allocated memory of the two objects overlap.
Modifying the new `Buffer` slice will modify the memory in the original `Buffer`
because the allocated memory of the two objects overlap.

Example: Create a `Buffer` with the ASCII alphabet, take a slice, and then modify
one byte from the original `Buffer`
Expand Down
68 changes: 33 additions & 35 deletions doc/api/child_process.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,8 @@ exec('echo "The \\$HOME variable is $HOME"');
//The $HOME variable is escaped in the first instance, but not in the second
```

*Note*: Never pass unsanitized user input to this function. Any input
containing shell metacharacters may be used to trigger arbitrary command
execution.
**Never pass unsanitized user input to this function. Any input containing shell
metacharacters may be used to trigger arbitrary command execution.**

```js
const { exec } = require('child_process');
Expand Down Expand Up @@ -218,8 +217,8 @@ If `timeout` is greater than `0`, the parent will send the signal
identified by the `killSignal` property (the default is `'SIGTERM'`) if the
child runs longer than `timeout` milliseconds.

*Note*: Unlike the exec(3) POSIX system call, `child_process.exec()` does not
replace the existing process and uses a shell to execute the command.
Unlike the exec(3) POSIX system call, `child_process.exec()` does not replace
the existing process and uses a shell to execute the command.

If this method is invoked as its [`util.promisify()`][]ed version, it returns
a Promise for an object with `stdout` and `stderr` properties. In case of an
Expand Down Expand Up @@ -314,9 +313,9 @@ async function getVersion() {
getVersion();
```

*Note*: If the `shell` option is enabled, do not pass unsanitized user input
to this function. Any input containing shell metacharacters may be used to
trigger arbitrary command execution.
**If the `shell` option is enabled, do not pass unsanitized user input to this
function. Any input containing shell metacharacters may be used to trigger
arbitrary command execution.**

### child_process.fork(modulePath[, args][, options])
<!-- YAML
Expand Down Expand Up @@ -374,11 +373,11 @@ Node.js processes launched with a custom `execPath` will communicate with the
parent process using the file descriptor (fd) identified using the
environment variable `NODE_CHANNEL_FD` on the child process.

*Note*: Unlike the fork(2) POSIX system call, `child_process.fork()` does
not clone the current process.
Unlike the fork(2) POSIX system call, `child_process.fork()` does not clone the
current process.

*Note*: The `shell` option available in [`child_process.spawn()`][] is not
supported by `child_process.fork()` and will be ignored if set.
The `shell` option available in [`child_process.spawn()`][] is not supported by
`child_process.fork()` and will be ignored if set.

### child_process.spawn(command[, args][, options])
<!-- YAML
Expand Down Expand Up @@ -424,9 +423,9 @@ The `child_process.spawn()` method spawns a new process using the given
`command`, with command line arguments in `args`. If omitted, `args` defaults
to an empty array.

*Note*: If the `shell` option is enabled, do not pass unsanitized user input to
this function. Any input containing shell metacharacters may be used to
trigger arbitrary command execution.
**If the `shell` option is enabled, do not pass unsanitized user input to this
function. Any input containing shell metacharacters may be used to trigger
arbitrary command execution.**

A third argument may be used to specify additional options, with these defaults:

Expand Down Expand Up @@ -513,12 +512,12 @@ subprocess.on('error', (err) => {
});
```

*Note*: Certain platforms (macOS, Linux) will use the value of `argv[0]` for
the process title while others (Windows, SunOS) will use `command`.
Certain platforms (macOS, Linux) will use the value of `argv[0]` for the process
title while others (Windows, SunOS) will use `command`.

*Note*: Node.js currently overwrites `argv[0]` with `process.execPath` on
startup, so `process.argv[0]` in a Node.js child process will not match the
`argv0` parameter passed to `spawn` from the parent, retrieve it with the
Node.js currently overwrites `argv[0]` with `process.execPath` on startup, so
`process.argv[0]` in a Node.js child process will not match the `argv0`
parameter passed to `spawn` from the parent, retrieve it with the
`process.argv0` property instead.

#### options.detached
Expand Down Expand Up @@ -725,17 +724,17 @@ until the child process has fully closed. When a timeout has been encountered
and `killSignal` is sent, the method won't return until the process has
completely exited.

*Note*: If the child process intercepts and handles the `SIGTERM` signal and
If the child process intercepts and handles the `SIGTERM` signal and
does not exit, the parent process will still wait until the child process has
exited.

If the process times out or has a non-zero exit code, this method ***will***
throw an [`Error`][] that will include the full result of the underlying
[`child_process.spawnSync()`][].

*Note*: If the `shell` option is enabled, do not pass unsanitized user input
to this function. Any input containing shell metacharacters may be used to
trigger arbitrary command execution.
**If the `shell` option is enabled, do not pass unsanitized user input to this
function. Any input containing shell metacharacters may be used to trigger
arbitrary command execution.**

### child_process.execSync(command[, options])
<!-- YAML
Expand Down Expand Up @@ -789,9 +788,8 @@ If the process times out or has a non-zero exit code, this method ***will***
throw. The [`Error`][] object will contain the entire result from
[`child_process.spawnSync()`][]

*Note*: Never pass unsanitized user input to this function. Any input
containing shell metacharacters may be used to trigger arbitrary command
execution.
**Never pass unsanitized user input to this function. Any input containing shell
metacharacters may be used to trigger arbitrary command execution.**

### child_process.spawnSync(command[, args][, options])
<!-- YAML
Expand Down Expand Up @@ -857,9 +855,9 @@ completely exited. Note that if the process intercepts and handles the
`SIGTERM` signal and doesn't exit, the parent process will wait until the child
process has exited.

*Note*: If the `shell` option is enabled, do not pass unsanitized user input
to this function. Any input containing shell metacharacters may be used to
trigger arbitrary command execution.
**If the `shell` option is enabled, do not pass unsanitized user input to this
function. Any input containing shell metacharacters may be used to trigger
arbitrary command execution.**

## Class: ChildProcess
<!-- YAML
Expand Down Expand Up @@ -907,9 +905,9 @@ The `'error'` event is emitted whenever:
2. The process could not be killed, or
3. Sending a message to the child process failed.

*Note*: The `'exit'` event may or may not fire after an error has occurred.
When listening to both the `'exit'` and `'error'` events, it is important
to guard against accidentally invoking handler functions multiple times.
The `'exit'` event may or may not fire after an error has occurred. When
listening to both the `'exit'` and `'error'` events, it is important to guard
against accidentally invoking handler functions multiple times.

See also [`subprocess.kill()`][] and [`subprocess.send()`][].

Expand Down Expand Up @@ -948,7 +946,7 @@ added: v0.5.9
The `'message'` event is triggered when a child process uses [`process.send()`][]
to send messages.

*Note*: The message goes through serialization and parsing. The resulting
The message goes through serialization and parsing. The resulting
message might not be the same as what is originally sent.

### subprocess.channel
Expand Down Expand Up @@ -1111,7 +1109,7 @@ be used to send messages to the child process. When the child process is a
Node.js instance, these messages can be received via the
[`process.on('message')`][] event.

*Note*: The message goes through serialization and parsing. The resulting
The message goes through serialization and parsing. The resulting
message might not be the same as what is originally sent.

For example, in the parent script:
Expand Down
40 changes: 20 additions & 20 deletions doc/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ changes:
Evaluate the following argument as JavaScript. The modules which are
predefined in the REPL can also be used in `script`.

*Note*: On Windows, using `cmd.exe` a single quote will not work correctly
because it only recognizes double `"` for quoting. In Powershell or
Git bash, both `'` and `"` are usable.
On Windows, using `cmd.exe` a single quote will not work correctly because it
only recognizes double `"` for quoting. In Powershell or Git bash, both `'`
and `"` are usable.


### `-p`, `--print "script"`
Expand Down Expand Up @@ -161,9 +161,9 @@ added: v8.0.0

Emit pending deprecation warnings.

*Note*: Pending deprecations are generally identical to a runtime deprecation
with the notable exception that they are turned *off* by default and will not
be emitted unless either the `--pending-deprecation` command line flag, or the
Pending deprecations are generally identical to a runtime deprecation with the
notable exception that they are turned *off* by default and will not be emitted
unless either the `--pending-deprecation` command line flag, or the
`NODE_PENDING_DEPRECATION=1` environment variable, is set. Pending deprecations
are used to provide a kind of selective "early warning" mechanism that
developers may leverage to detect deprecated API usage.
Expand All @@ -183,9 +183,9 @@ added: v0.10
Aborting instead of exiting causes a core file to be generated for post-mortem
analysis using a debugger (such as `lldb`, `gdb`, and `mdb`).

*Note*: If this flag is passed, the behavior can still be set to not abort
through [`process.setUncaughtExceptionCaptureCallback()`][] (and through usage
of the `domain` module that uses it).
If this flag is passed, the behavior can still be set to not abort through
[`process.setUncaughtExceptionCaptureCallback()`][] (and through usage of the
`domain` module that uses it).

### `--trace-warnings`
<!-- YAML
Expand Down Expand Up @@ -315,7 +315,7 @@ added: v0.1.3

Print V8 command line options.

*Note*: V8 options allow words to be separated by both dashes (`-`) or
V8 options allow words to be separated by both dashes (`-`) or
underscores (`_`).

For example, `--stack-trace-limit` is equivalent to `--stack_trace_limit`.
Expand Down Expand Up @@ -419,7 +419,7 @@ added: v0.1.32

`':'`-separated list of directories prefixed to the module search path.

*Note*: On Windows, this is a `';'`-separated list instead.
On Windows, this is a `';'`-separated list instead.


### `NODE_DISABLE_COLORS=1`
Expand Down Expand Up @@ -495,9 +495,9 @@ added: v8.0.0

When set to `1`, emit pending deprecation warnings.

*Note*: Pending deprecations are generally identical to a runtime deprecation
with the notable exception that they are turned *off* by default and will not
be emitted unless either the `--pending-deprecation` command line flag, or the
Pending deprecations are generally identical to a runtime deprecation with the
notable exception that they are turned *off* by default and will not be emitted
unless either the `--pending-deprecation` command line flag, or the
`NODE_PENDING_DEPRECATION=1` environment variable, is set. Pending deprecations
are used to provide a kind of selective "early warning" mechanism that
developers may leverage to detect deprecated API usage.
Expand Down Expand Up @@ -554,9 +554,9 @@ added: v7.7.0
If `--use-openssl-ca` is enabled, this overrides and sets OpenSSL's directory
containing trusted certificates.

*Note*: Be aware that unless the child environment is explicitly set, this
environment variable will be inherited by any child processes, and if they use
OpenSSL, it may cause them to trust the same CAs as node.
Be aware that unless the child environment is explicitly set, this environment
variable will be inherited by any child processes, and if they use OpenSSL, it
may cause them to trust the same CAs as node.

### `SSL_CERT_FILE=file`
<!-- YAML
Expand All @@ -566,9 +566,9 @@ added: v7.7.0
If `--use-openssl-ca` is enabled, this overrides and sets OpenSSL's file
containing trusted certificates.

*Note*: Be aware that unless the child environment is explicitly set, this
environment variable will be inherited by any child processes, and if they use
OpenSSL, it may cause them to trust the same CAs as node.
Be aware that unless the child environment is explicitly set, this environment
variable will be inherited by any child processes, and if they use OpenSSL, it
may cause them to trust the same CAs as node.

### `NODE_REDIRECT_WARNINGS=file`
<!-- YAML
Expand Down
6 changes: 3 additions & 3 deletions doc/api/cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ Node.js process and a cluster worker differs:
port is random the first time, but predictable thereafter. To listen
on a unique port, generate a port number based on the cluster worker ID.

*Note*: Node.js does not provide routing logic. It is, therefore important to
design an application such that it does not rely too heavily on in-memory data
objects for things like sessions and login.
Node.js does not provide routing logic. It is, therefore important to design an
application such that it does not rely too heavily on in-memory data objects for
things like sessions and login.

Because workers are all separate processes, they can be killed or
re-spawned depending on a program's needs, without affecting other
Expand Down
8 changes: 4 additions & 4 deletions doc/api/console.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ console.assert(false, 'Whoops %s', 'didn\'t work');
// AssertionError: Whoops didn't work
```

*Note*: The `console.assert()` method is implemented differently in Node.js
than the `console.assert()` method [available in browsers][web-api-assert].
The `console.assert()` method is implemented differently in Node.js than the
`console.assert()` method [available in browsers][web-api-assert].

Specifically, in browsers, calling `console.assert()` with a falsy
assertion will cause the `message` to be printed to the console without
Expand Down Expand Up @@ -176,8 +176,8 @@ added: v8.3.0
When `stdout` is a TTY, calling `console.clear()` will attempt to clear the
TTY. When `stdout` is not a TTY, this method does nothing.

*Note*: The specific operation of `console.clear()` can vary across operating
systems and terminal types. For most Linux operating systems, `console.clear()`
The specific operation of `console.clear()` can vary across operating systems
and terminal types. For most Linux operating systems, `console.clear()`
operates similarly to the `clear` shell command. On Windows, `console.clear()`
will clear only the output in the current terminal viewport for the Node.js
binary.
Expand Down
Loading

0 comments on commit 9c67262

Please sign in to comment.