Skip to content

Commit

Permalink
doc: add missing periods or colons
Browse files Browse the repository at this point in the history
Some other formatting nits were fixed
and some superfluous descriptions were simplified in passing.

PR-URL: #20401
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
  • Loading branch information
vsemozhetbyt committed May 2, 2018
1 parent 536b1fb commit 392d80a
Show file tree
Hide file tree
Showing 26 changed files with 97 additions and 100 deletions.
2 changes: 1 addition & 1 deletion doc/api/buffer.md
Original file line number Diff line number Diff line change
Expand Up @@ -2458,7 +2458,7 @@ added: v3.0.0

* {integer} The largest size allowed for a single `Buffer` instance.

An alias for [`buffer.constants.MAX_LENGTH`][]
An alias for [`buffer.constants.MAX_LENGTH`][].

Note that this is a property on the `buffer` module returned by
`require('buffer')`, not on the `Buffer` global or a `Buffer` instance.
Expand Down
6 changes: 3 additions & 3 deletions doc/api/child_process.md
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ child registers an event handler for the [`'disconnect'`][] event
or the [`'message'`][] event. This allows the child to exit
normally without the process being held open by the open IPC channel.*

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

## Synchronous Process Creation

Expand Down Expand Up @@ -776,7 +776,7 @@ process has exited.*

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()`][]
[`child_process.spawnSync()`][].

**Never pass unsanitized user input to this function. Any input containing shell
metacharacters may be used to trigger arbitrary command execution.**
Expand Down Expand Up @@ -1056,7 +1056,7 @@ does not indicate that the child process has been terminated.
added: v0.1.90
-->

* {number} Integer
* {integer}

Returns the process identifier (PID) of the child process.

Expand Down
10 changes: 5 additions & 5 deletions doc/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ added: v6.0.0
-->

Enable FIPS-compliant crypto at startup. (Requires Node.js to be built with
`./configure --openssl-fips`)
`./configure --openssl-fips`.)

### `--experimental-modules`
<!-- YAML
Expand Down Expand Up @@ -87,14 +87,14 @@ added: v6.0.0
-->

Force FIPS-compliant crypto on startup. (Cannot be disabled from script code.)
(Same requirements as `--enable-fips`)
(Same requirements as `--enable-fips`.)

### `--icu-data-dir=file`
<!-- YAML
added: v0.11.15
-->

Specify ICU data load path. (overrides `NODE_ICU_DATA`)
Specify ICU data load path. (Overrides `NODE_ICU_DATA`.)

### `--inspect-brk[=[host:]port]`
<!-- YAML
Expand Down Expand Up @@ -246,8 +246,8 @@ Throw errors for deprecations.
added: v4.0.0
-->

Specify an alternative default TLS cipher list. (Requires Node.js to be built
with crypto support. (Default))
Specify an alternative default TLS cipher list. Requires Node.js to be built
with crypto support (default).

### `--trace-deprecation`
<!-- 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 @@ -363,7 +363,7 @@ Each new worker is given its own unique id, this id is stored in the
`id`.

While a worker is alive, this is the key that indexes it in
cluster.workers
`cluster.workers`.

### worker.isConnected()
<!-- YAML
Expand Down Expand Up @@ -412,7 +412,7 @@ All workers are created using [`child_process.fork()`][], the returned object
from this function is stored as `.process`. In a worker, the global `process`
is stored.

See: [Child Process module][]
See: [Child Process module][].

Note that workers will call `process.exit(0)` if the `'disconnect'` event occurs
on `process` and `.exitedAfterDisconnect` is not `true`. This protects against
Expand Down Expand Up @@ -748,7 +748,7 @@ changes:
description: The `stdio` option is supported now.
-->

* `settings` {Object} see [`cluster.settings`][]
* `settings` {Object} See [`cluster.settings`][].

`setupMaster` is used to change the default 'fork' behavior. Once called,
the settings will be present in `cluster.settings`.
Expand Down
2 changes: 1 addition & 1 deletion doc/api/console.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ changes:
Setting to `true` enables coloring while inspecting values, setting to
`'auto'` will make color support depend on the value of the `isTTY` property
and the value returned by `getColorDepth()` on the respective stream.
**Default:** `'auto'`
**Default:** `'auto'`.

Creates a new `Console` with one or two writable stream instances. `stdout` is a
writable stream to print log or info output. `stderr` is used for warning or
Expand Down
2 changes: 1 addition & 1 deletion doc/api/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ explicitly via error event handlers set on the domain instead.
Type: End-of-Life

Calling an asynchronous function without a callback throws a `TypeError`
v10.0.0 onwards. Refer: [PR 12562](https://github.com/nodejs/node/pull/12562)
v10.0.0 onwards. Refer: [PR 12562](https://github.com/nodejs/node/pull/12562).

<a id="DEP0014"></a>
### DEP0014: fs.read legacy String interface
Expand Down
16 changes: 8 additions & 8 deletions doc/api/dgram.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ properties.
added: v0.1.99
-->

* `port` {number} Integer.
* `port` {integer}
* `address` {string}
* `callback` {Function} with no parameters. Called when binding is complete.

Expand Down Expand Up @@ -279,9 +279,9 @@ changes:
-->

* `msg` {Buffer|Uint8Array|string|Array} Message to be sent.
* `offset` {number} Integer. Offset in the buffer where the message starts.
* `length` {number} Integer. Number of bytes in the message.
* `port` {number} Integer. Destination port.
* `offset` {integer} Offset in the buffer where the message starts.
* `length` {integer} Number of bytes in the message.
* `port` {integer} Destination port.
* `address` {string} Destination hostname or IP address.
* `callback` {Function} Called when the message has been sent.

Expand Down Expand Up @@ -479,7 +479,7 @@ multicast packets will also be received on the local interface.
added: v0.3.8
-->

* `ttl` {number} Integer.
* `ttl` {integer}

Sets the `IP_MULTICAST_TTL` socket option. While TTL generally stands for
"Time to Live", in this context it specifies the number of IP hops that a
Expand All @@ -495,7 +495,7 @@ between 0 and 255. The default on most systems is `1` but can vary.
added: v8.7.0
-->

* `size` {number} Integer
* `size` {integer}

Sets the `SO_RCVBUF` socket option. Sets the maximum socket receive buffer
in bytes.
Expand All @@ -505,7 +505,7 @@ in bytes.
added: v8.7.0
-->

* `size` {number} Integer
* `size` {integer}

Sets the `SO_SNDBUF` socket option. Sets the maximum socket send buffer
in bytes.
Expand All @@ -515,7 +515,7 @@ in bytes.
added: v0.1.101
-->

* `ttl` {number} Integer.
* `ttl` {integer}

Sets the `IP_TTL` socket option. While TTL generally stands for "Time to Live",
in this context it specifies the number of IP hops that a packet is allowed to
Expand Down
2 changes: 1 addition & 1 deletion doc/api/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -1660,7 +1660,7 @@ entry types were found.
<a id="ERR_VALUE_OUT_OF_RANGE"></a>
### ERR_VALUE_OUT_OF_RANGE

Superseded by `ERR_OUT_OF_RANGE`
Superseded by `ERR_OUT_OF_RANGE`.

<a id="ERR_VM_MODULE_ALREADY_LINKED"></a>
### ERR_VM_MODULE_ALREADY_LINKED
Expand Down
19 changes: 10 additions & 9 deletions doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ added: v0.1.10

Returns `true` if the `fs.Stats` object describes a symbolic link.

This method is only valid when using [`fs.lstat()`][]
This method is only valid when using [`fs.lstat()`][].

### stats.dev

Expand Down Expand Up @@ -1038,7 +1038,7 @@ changes:
Asynchronously changes the permissions of a file. No arguments other than a
possible exception are given to the completion callback.

See also: chmod(2)
See also: chmod(2).

### File modes

Expand Down Expand Up @@ -1097,7 +1097,7 @@ changes:
Synchronously changes the permissions of a file. Returns `undefined`.
This is the synchronous version of [`fs.chmod()`][].

See also: chmod(2)
See also: chmod(2).

## fs.chown(path, uid, gid, callback)
<!-- YAML
Expand Down Expand Up @@ -1126,7 +1126,7 @@ changes:
Asynchronously changes owner and group of a file. No arguments other than a
possible exception are given to the completion callback.

See also: chown(2)
See also: chown(2).

## fs.chownSync(path, uid, gid)
<!-- YAML
Expand All @@ -1145,7 +1145,7 @@ changes:
Synchronously changes owner and group of a file. Returns `undefined`.
This is the synchronous version of [`fs.chown()`][].

See also: chown(2)
See also: chown(2).

## fs.close(fd, callback)
<!-- YAML
Expand Down Expand Up @@ -1711,7 +1711,8 @@ given to the completion callback.
If the file referred to by the file descriptor was larger than `len` bytes, only
the first `len` bytes will be retained in the file.

For example, the following program retains only the first four bytes of the file
For example, the following program retains only the first four bytes of the
file:

```js
console.log(fs.readFileSync('temp.txt', 'utf8'));
Expand Down Expand Up @@ -1985,7 +1986,7 @@ changes:
Asynchronously creates a directory. No arguments other than a possible exception
are given to the completion callback.

See also: mkdir(2)
See also: mkdir(2).

## fs.mkdirSync(path[, mode])
<!-- YAML
Expand All @@ -2003,7 +2004,7 @@ changes:
Synchronously creates a directory. Returns `undefined`.
This is the synchronous version of [`fs.mkdir()`][].

See also: mkdir(2)
See also: mkdir(2).

## fs.mkdtemp(prefix[, options], callback)
<!-- YAML
Expand Down Expand Up @@ -2868,7 +2869,7 @@ fs.unlink('path/file.txt', (err) => {
`fs.unlink()` will not work on a directory, empty or otherwise. To remove a
directory, use [`fs.rmdir()`][].

See also: unlink(2)
See also: unlink(2).

## fs.unlinkSync(path)
<!-- YAML
Expand Down
6 changes: 3 additions & 3 deletions doc/api/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ added: v0.7.8
Emitted when the underlying socket times out from inactivity. This only notifies
that the socket has been idle. The request must be aborted manually.

See also: [`request.setTimeout()`][]
See also: [`request.setTimeout()`][].

### Event: 'upgrade'
<!-- YAML
Expand Down Expand Up @@ -541,7 +541,7 @@ added: v0.3.0

* {net.Socket}

See [`request.socket`][]
See [`request.socket`][].

### request.end([data[, encoding]][, callback])
<!-- YAML
Expand Down Expand Up @@ -1798,7 +1798,7 @@ automatically. Note that the callback must take care to consume the response
data for reasons stated in [`http.ClientRequest`][] section.

The `callback` is invoked with a single argument that is an instance of
[`http.IncomingMessage`][]
[`http.IncomingMessage`][].

JSON Fetching Example:

Expand Down
2 changes: 1 addition & 1 deletion doc/api/http2.md
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ protocol is available on the host `'example.org'` on TCP/IP port 81. The
host and port *must* be contained within the quote (`"`) characters.

Multiple alternatives may be specified, for instance: `'h2="example.org:81",
h2=":82"'`
h2=":82"'`.

The protocol identifier (`'h2'` in the examples) may be any valid
[ALPN Protocol ID][].
Expand Down
2 changes: 1 addition & 1 deletion doc/api/https.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ Makes a request to a secure web server.
The following additional `options` from [`tls.connect()`][] are also accepted:
`ca`, `cert`, `ciphers`, `clientCertEngine`, `crl`, `dhparam`, `ecdhCurve`,
`honorCipherOrder`, `key`, `passphrase`, `pfx`, `rejectUnauthorized`,
`secureOptions`, `secureProtocol`, `servername`, `sessionIdContext`
`secureOptions`, `secureProtocol`, `servername`, `sessionIdContext`.

`options` can be an object, a string, or a [`URL`][] object. If `options` is a
string, it is automatically parsed with [`new URL()`][]. If it is a [`URL`][]
Expand Down
4 changes: 2 additions & 2 deletions doc/api/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ this, assign the desired export object to `module.exports`. Note that assigning
the desired object to `exports` will simply rebind the local `exports` variable,
which is probably not what is desired.

For example suppose we were making a module called `a.js`
For example suppose we were making a module called `a.js`:

```js
const EventEmitter = require('events');
Expand All @@ -720,7 +720,7 @@ setTimeout(() => {
}, 1000);
```

Then in another file we could do
Then in another file we could do:

```js
const a = require('./a');
Expand Down
6 changes: 3 additions & 3 deletions doc/api/n-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2635,7 +2635,7 @@ napi_status napi_set_named_property(napi_env env,
Returns `napi_ok` if the API succeeded.

This method is equivalent to calling [`napi_set_property`][] with a `napi_value`
created from the string passed in as `utf8Name`
created from the string passed in as `utf8Name`.

#### napi_get_named_property
<!-- YAML
Expand All @@ -2656,7 +2656,7 @@ napi_status napi_get_named_property(napi_env env,
Returns `napi_ok` if the API succeeded.

This method is equivalent to calling [`napi_get_property`][] with a `napi_value`
created from the string passed in as `utf8Name`
created from the string passed in as `utf8Name`.

#### napi_has_named_property
<!-- YAML
Expand All @@ -2677,7 +2677,7 @@ napi_status napi_has_named_property(napi_env env,
Returns `napi_ok` if the API succeeded.

This method is equivalent to calling [`napi_has_property`][] with a `napi_value`
created from the string passed in as `utf8Name`
created from the string passed in as `utf8Name`.

#### napi_set_element
<!-- YAML
Expand Down
Loading

0 comments on commit 392d80a

Please sign in to comment.