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

[v14.x backport] doc: standardize on sentence case for headers #33961

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions doc/api/addons.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# C++ Addons
# C++ addons

<!--introduced_in=v0.10.0-->
<!-- type=misc -->
Expand Down Expand Up @@ -395,7 +395,7 @@ only the symbols exported by Node.js will be available.
source image. Using this option, the Addon will have access to the full set of
dependencies.

### Loading Addons using `require()`
### Loading addons using `require()`

The filename extension of the compiled Addon binary is `.node` (as opposed
to `.dll` or `.so`). The [`require()`][require] function is written to look for
Expand All @@ -410,7 +410,7 @@ there is a file `addon.js` in the same directory as the binary `addon.node`,
then [`require('addon')`][require] will give precedence to the `addon.js` file
and load it instead.

## Native Abstractions for Node.js
## Native abstractions for Node.js

Each of the examples illustrated in this document make direct use of the
Node.js and V8 APIs for implementing Addons. The V8 API can, and has, changed
Expand Down
8 changes: 4 additions & 4 deletions doc/api/async_hooks.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Async Hooks
# Async hooks

<!--introduced_in=v8.1.0-->

Expand Down Expand Up @@ -127,7 +127,7 @@ class MyAddedCallbacks extends MyAsyncCallbacks {
const asyncHook = async_hooks.createHook(new MyAddedCallbacks());
```

##### Error Handling
##### Error handling

If any `AsyncHook` callbacks throw, the application will print the stack trace
and exit. The exit path does follow that of an uncaught exception, but
Expand Down Expand Up @@ -201,7 +201,7 @@ be called again until enabled.

For API consistency `disable()` also returns the `AsyncHook` instance.

#### Hook Callbacks
#### Hook callbacks

Key events in the lifetime of asynchronous events have been categorized into
four areas: instantiation, before/after the callback is called, and when the
Expand Down Expand Up @@ -626,7 +626,7 @@ only on chained promises. That means promises not created by `then()`/`catch()`
will not have the `before` and `after` callbacks fired on them. For more details
see the details of the V8 [PromiseHooks][] API.

## JavaScript Embedder API
## JavaScript embedder API

Library developers that handle their own asynchronous resources performing tasks
like I/O, connection pooling, or managing callback queues may use the
Expand Down
4 changes: 2 additions & 2 deletions doc/api/buffer.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const buf6 = Buffer.from('tést');
const buf7 = Buffer.from('tést', 'latin1');
```

## Buffers and Character Encodings
## Buffers and character encodings
<!-- YAML
changes:
- version: v6.4.0
Expand Down Expand Up @@ -2640,7 +2640,7 @@ deprecated: v6.0.0

See [`Buffer.allocUnsafeSlow()`][].

## Buffer Constants
## Buffer constants
<!-- YAML
added: v8.2.0
-->
Expand Down
44 changes: 22 additions & 22 deletions doc/api/child_process.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Child Process
# Child process

<!--introduced_in=v0.10.0-->

Expand Down Expand Up @@ -70,7 +70,7 @@ For certain use cases, such as automating shell scripts, the
the synchronous methods can have significant impact on performance due to
stalling the event loop while spawned processes complete.

## Asynchronous Process Creation
## Asynchronous process creation

The [`child_process.spawn()`][], [`child_process.fork()`][], [`child_process.exec()`][],
and [`child_process.execFile()`][] methods all follow the idiomatic asynchronous
Expand Down Expand Up @@ -153,7 +153,7 @@ changes:
* `env` {Object} Environment key-value pairs. **Default:** `process.env`.
* `encoding` {string} **Default:** `'utf8'`
* `shell` {string} Shell to execute the command with. See
[Shell Requirements][] and [Default Windows Shell][]. **Default:**
[Shell requirements][] and [Default Windows shell][]. **Default:**
`'/bin/sh'` on Unix, `process.env.ComSpec` on Windows.
* `timeout` {number} **Default:** `0`
* `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or
Expand Down Expand Up @@ -270,8 +270,8 @@ changes:
done on Windows. Ignored on Unix. **Default:** `false`.
* `shell` {boolean|string} If `true`, runs `command` inside of a shell. Uses
`'/bin/sh'` on Unix, and `process.env.ComSpec` on Windows. A different
shell can be specified as a string. See [Shell Requirements][] and
[Default Windows Shell][]. **Default:** `false` (no shell).
shell can be specified as a string. See [Shell requirements][] and
[Default Windows shell][]. **Default:** `false` (no shell).
* `callback` {Function} Called with the output when process terminates.
* `error` {Error}
* `stdout` {string|Buffer}
Expand Down Expand Up @@ -355,7 +355,7 @@ changes:
**Default:** `process.execArgv`.
* `serialization` {string} Specify the kind of serialization used for sending
messages between processes. Possible values are `'json'` and `'advanced'`.
See [Advanced Serialization][] for more details. **Default:** `'json'`.
See [Advanced serialization][] for more details. **Default:** `'json'`.
* `silent` {boolean} If `true`, stdin, stdout, and stderr of the child will be
piped to the parent, otherwise they will be inherited from the parent, see
the `'pipe'` and `'inherit'` options for [`child_process.spawn()`][]'s
Expand Down Expand Up @@ -434,11 +434,11 @@ changes:
* `gid` {number} Sets the group identity of the process (see setgid(2)).
* `serialization` {string} Specify the kind of serialization used for sending
messages between processes. Possible values are `'json'` and `'advanced'`.
See [Advanced Serialization][] for more details. **Default:** `'json'`.
See [Advanced serialization][] for more details. **Default:** `'json'`.
* `shell` {boolean|string} If `true`, runs `command` inside of a shell. Uses
`'/bin/sh'` on Unix, and `process.env.ComSpec` on Windows. A different
shell can be specified as a string. See [Shell Requirements][] and
[Default Windows Shell][]. **Default:** `false` (no shell).
shell can be specified as a string. See [Shell requirements][] and
[Default Windows shell][]. **Default:** `false` (no shell).
* `windowsVerbatimArguments` {boolean} No quoting or escaping of arguments is
done on Windows. Ignored on Unix. This is set to `true` automatically
when `shell` is specified and is CMD. **Default:** `false`.
Expand Down Expand Up @@ -699,7 +699,7 @@ see [V8 issue 7381](https://bugs.chromium.org/p/v8/issues/detail?id=7381).

See also: [`child_process.exec()`][] and [`child_process.fork()`][].

## Synchronous Process Creation
## Synchronous process creation

The [`child_process.spawnSync()`][], [`child_process.execSync()`][], and
[`child_process.execFileSync()`][] methods are synchronous and will block the
Expand Down Expand Up @@ -755,8 +755,8 @@ changes:
normally be created on Windows systems. **Default:** `false`.
* `shell` {boolean|string} If `true`, runs `command` inside of a shell. Uses
`'/bin/sh'` on Unix, and `process.env.ComSpec` on Windows. A different
shell can be specified as a string. See [Shell Requirements][] and
[Default Windows Shell][]. **Default:** `false` (no shell).
shell can be specified as a string. See [Shell requirements][] and
[Default Windows shell][]. **Default:** `false` (no shell).
* Returns: {Buffer|string} The stdout from the command.

The `child_process.execFileSync()` method is generally identical to
Expand Down Expand Up @@ -804,7 +804,7 @@ changes:
**Default:** `'pipe'`.
* `env` {Object} Environment key-value pairs. **Default:** `process.env`.
* `shell` {string} Shell to execute the command with. See
[Shell Requirements][] and [Default Windows Shell][]. **Default:**
[Shell requirements][] and [Default Windows shell][]. **Default:**
`'/bin/sh'` on Unix, `process.env.ComSpec` on Windows.
* `uid` {number} Sets the user identity of the process. (See setuid(2)).
* `gid` {number} Sets the group identity of the process. (See setgid(2)).
Expand Down Expand Up @@ -884,8 +884,8 @@ changes:
**Default:** `'buffer'`.
* `shell` {boolean|string} If `true`, runs `command` inside of a shell. Uses
`'/bin/sh'` on Unix, and `process.env.ComSpec` on Windows. A different
shell can be specified as a string. See [Shell Requirements][] and
[Default Windows Shell][]. **Default:** `false` (no shell).
shell can be specified as a string. See [Shell requirements][] and
[Default Windows shell][]. **Default:** `false` (no shell).
* `windowsVerbatimArguments` {boolean} No quoting or escaping of arguments is
done on Windows. Ignored on Unix. This is set to `true` automatically
when `shell` is specified and is CMD. **Default:** `false`.
Expand Down Expand Up @@ -1025,7 +1025,7 @@ message might not be the same as what is originally sent.
If the `serialization` option was set to `'advanced'` used when spawning the
child process, the `message` argument can contain data that JSON is not able
to represent.
See [Advanced Serialization][] for more details.
See [Advanced serialization][] for more details.

### `subprocess.channel`
<!-- YAML
Expand Down Expand Up @@ -1544,21 +1544,21 @@ This impacts output that includes multibyte character encodings such as UTF-8 or
UTF-16. For instance, `console.log('中文测试')` will send 13 UTF-8 encoded bytes
to `stdout` although there are only 4 characters.

## Shell Requirements
## Shell requirements

The shell should understand the `-c` switch. If the shell is `'cmd.exe'`, it
should understand the `/d /s /c` switches and command line parsing should be
compatible.

## Default Windows Shell
## Default Windows shell

Although Microsoft specifies `%COMSPEC%` must contain the path to
`'cmd.exe'` in the root environment, child processes are not always subject to
the same requirement. Thus, in `child_process` functions where a shell can be
spawned, `'cmd.exe'` is used as a fallback if `process.env.ComSpec` is
unavailable.

## Advanced Serialization
## Advanced serialization
<!-- YAML
added:
- v13.2.0
Expand All @@ -1579,7 +1579,7 @@ Therefore, this feature requires opting in by setting the
`serialization` option to `'advanced'` when calling [`child_process.spawn()`][]
or [`child_process.fork()`][].

[Advanced Serialization]: #child_process_advanced_serialization
[Advanced serialization]: #child_process_advanced_serialization
[`'disconnect'`]: process.html#process_event_disconnect
[`'error'`]: #child_process_event_error
[`'exit'`]: #child_process_event_exit
Expand Down Expand Up @@ -1612,8 +1612,8 @@ or [`child_process.fork()`][].
[`subprocess.stdio`]: #child_process_subprocess_stdio
[`subprocess.stdout`]: #child_process_subprocess_stdout
[`util.promisify()`]: util.html#util_util_promisify_original
[Default Windows Shell]: #child_process_default_windows_shell
[Default Windows shell]: #child_process_default_windows_shell
[HTML structured clone algorithm]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm
[Shell Requirements]: #child_process_shell_requirements
[Shell requirements]: #child_process_shell_requirements
[synchronous counterparts]: #child_process_synchronous_process_creation
[v8.serdes]: v8.html#v8_serialization_api
16 changes: 8 additions & 8 deletions doc/api/cli.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Command Line Options
# Command line options

<!--introduced_in=v5.9.1-->
<!--type=misc-->
Expand Down Expand Up @@ -160,7 +160,7 @@ added: v12.12.0

> Stability: 1 - Experimental

Enable experimental Source Map V3 support for stack traces.
Enable experimental Source Map v3 support for stack traces.

Currently, overriding `Error.prepareStackTrace` is ignored when the
`--enable-source-maps` flag is set.
Expand Down Expand Up @@ -1099,7 +1099,7 @@ added: v0.1.3

Print node's version.

## Environment Variables
## Environment variables

### `NODE_DEBUG=module[,…]`
<!-- YAML
Expand Down Expand Up @@ -1375,7 +1375,7 @@ easier to instrument applications that call the `child_process.spawn()` family
of functions. `NODE_V8_COVERAGE` can be set to an empty string, to prevent
propagation.

#### Coverage Output
#### Coverage output

Coverage is output as an array of [ScriptCoverage][] objects on the top-level
key `result`:
Expand All @@ -1392,16 +1392,16 @@ key `result`:
}
```

#### Source Map Cache
#### Source map cache

> Stability: 1 - Experimental

If found, Source Map data is appended to the top-level key `source-map-cache`
If found, source map data is appended to the top-level key `source-map-cache`
on the JSON coverage object.

`source-map-cache` is an object with keys representing the files source maps
were extracted from, and values which include the raw source-map URL
(in the key `url`), the parsed Source Map V3 information (in the key `data`),
(in the key `url`), the parsed Source Map v3 information (in the key `data`),
and the line lengths of the source file (in the key `lineLengths`).

```json
Expand Down Expand Up @@ -1510,7 +1510,7 @@ options are of interest only to V8 developers. Despite this, there is a small
set of V8 options that are widely applicable to Node.js, and they are
documented here:

### `--max-old-space-size=SIZE` (in Mbytes)
### `--max-old-space-size=SIZE` (in megabytes)

Sets the max memory size of V8's old memory section. As memory
consumption approaches the limit, V8 will spend more time on
Expand Down
6 changes: 3 additions & 3 deletions doc/api/cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Worker 5644 started

On Windows, it is not yet possible to set up a named pipe server in a worker.

## How It Works
## How it works

<!--type=misc-->

Expand Down Expand Up @@ -753,7 +753,7 @@ changes:
`undefined` (inherits from parent process).
* `serialization` {string} Specify the kind of serialization used for sending
messages between processes. Possible values are `'json'` and `'advanced'`.
See [Advanced Serialization for `child_process`][] for more details.
See [Advanced serialization for `child_process`][] for more details.
**Default:** `false`.
* `silent` {boolean} Whether or not to send output to parent's stdio.
**Default:** `false`.
Expand Down Expand Up @@ -883,5 +883,5 @@ socket.on('data', (id) => {
[`process` event: `'message'`]: process.html#process_event_message
[`server.close()`]: net.html#net_event_close
[`worker.exitedAfterDisconnect`]: #cluster_worker_exitedafterdisconnect
[Advanced Serialization for `child_process`]: child_process.html#child_process_advanced_serialization
[Advanced serialization for `child_process`]: child_process.html#child_process_advanced_serialization
[Child Process module]: child_process.html#child_process_child_process_fork_modulepath_args_options
18 changes: 9 additions & 9 deletions doc/api/crypto.md
Original file line number Diff line number Diff line change
Expand Up @@ -1585,7 +1585,7 @@ added: v6.3.0

* Returns: {Object} An object containing commonly used constants for crypto and
security related operations. The specific constants currently defined are
described in [Crypto Constants][].
described in [Crypto constants][].

### `crypto.DEFAULT_ENCODING`
<!-- YAML
Expand Down Expand Up @@ -3045,7 +3045,7 @@ key may be passed for `key`.

## Notes

### Legacy Streams API (prior to Node.js 0.10)
### Legacy streams API (prior to Node.js 0.10)

The Crypto module was added to Node.js before there was the concept of a
unified Stream API, and before there were [`Buffer`][] objects for handling
Expand All @@ -3056,7 +3056,7 @@ and returned `'latin1'` encoded strings by default rather than `Buffer`s. This
default was changed after Node.js v0.8 to use [`Buffer`][] objects by default
instead.

### Recent ECDH Changes
### Recent ECDH changes

Usage of `ECDH` with non-dynamically generated key pairs has been simplified.
Now, [`ecdh.setPrivateKey()`][] can be called with a preselected private key
Expand Down Expand Up @@ -3164,12 +3164,12 @@ try {
console.log(receivedPlaintext);
```

## Crypto Constants
## Crypto constants

The following constants exported by `crypto.constants` apply to various uses of
the `crypto`, `tls`, and `https` modules and are generally specific to OpenSSL.

### OpenSSL Options
### OpenSSL options

<table>
<tr>
Expand Down Expand Up @@ -3325,7 +3325,7 @@ the `crypto`, `tls`, and `https` modules and are generally specific to OpenSSL.
</tr>
</table>

### OpenSSL Engine Constants
### OpenSSL engine constants

<table>
<tr>
Expand Down Expand Up @@ -3378,7 +3378,7 @@ the `crypto`, `tls`, and `https` modules and are generally specific to OpenSSL.
</tr>
</table>

### Other OpenSSL Constants
### Other OpenSSL constants

<table>
<tr>
Expand Down Expand Up @@ -3458,7 +3458,7 @@ the `crypto`, `tls`, and `https` modules and are generally specific to OpenSSL.
</tr>
</table>

### Node.js Crypto Constants
### Node.js crypto constants

<table>
<tr>
Expand Down Expand Up @@ -3529,7 +3529,7 @@ the `crypto`, `tls`, and `https` modules and are generally specific to OpenSSL.
[AEAD algorithms]: https://en.wikipedia.org/wiki/Authenticated_encryption
[CCM mode]: #crypto_ccm_mode
[Caveats]: #crypto_support_for_weak_or_compromised_algorithms
[Crypto Constants]: #crypto_crypto_constants_1
[Crypto constants]: #crypto_crypto_constants_1
[HTML 5.2]: https://www.w3.org/TR/html52/changes.html#features-removed
[HTML5's `keygen` element]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/keygen
[NIST SP 800-131A]: https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-131Ar1.pdf
Expand Down
Loading