From 392d80a617fab8630e3f017076f1f59403db6470 Mon Sep 17 00:00:00 2001 From: Vse Mozhet Byt Date: Sun, 29 Apr 2018 14:16:44 +0300 Subject: [PATCH] doc: add missing periods or colons Some other formatting nits were fixed and some superfluous descriptions were simplified in passing. PR-URL: https://github.com/nodejs/node/pull/20401 Reviewed-By: Ruben Bridgewater Reviewed-By: Gireesh Punathil Reviewed-By: Trivikram Kamat Reviewed-By: Colin Ihrig --- doc/api/buffer.md | 2 +- doc/api/child_process.md | 6 +++--- doc/api/cli.md | 10 +++++----- doc/api/cluster.md | 6 +++--- doc/api/console.md | 2 +- doc/api/deprecations.md | 2 +- doc/api/dgram.md | 16 ++++++++-------- doc/api/errors.md | 2 +- doc/api/fs.md | 19 ++++++++++--------- doc/api/http.md | 6 +++--- doc/api/http2.md | 2 +- doc/api/https.md | 2 +- doc/api/modules.md | 4 ++-- doc/api/n-api.md | 6 +++--- doc/api/net.md | 22 ++++++++++------------ doc/api/os.md | 2 +- doc/api/process.md | 2 +- doc/api/readline.md | 2 +- doc/api/repl.md | 9 +++++---- doc/api/stream.md | 2 -- doc/api/synopsis.md | 6 +++--- doc/api/tls.md | 16 +++++++--------- doc/api/url.md | 22 +++++++++++----------- doc/api/util.md | 25 +++++++++++++------------ doc/api/vm.md | 2 +- doc/api/zlib.md | 2 +- 26 files changed, 97 insertions(+), 100 deletions(-) diff --git a/doc/api/buffer.md b/doc/api/buffer.md index 0195c1cd265..312b4f7c17f 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -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. diff --git a/doc/api/child_process.md b/doc/api/child_process.md index 62b2355ee38..47d68928e46 100644 --- a/doc/api/child_process.md +++ b/doc/api/child_process.md @@ -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 @@ -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.** @@ -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. diff --git a/doc/api/cli.md b/doc/api/cli.md index 817f49142cb..5bc673f5975 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -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` 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` -Specify ICU data load path. (overrides `NODE_ICU_DATA`) +Specify ICU data load path. (Overrides `NODE_ICU_DATA`.) ### `--inspect-brk[=[host:]port]` -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` -* `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`. diff --git a/doc/api/console.md b/doc/api/console.md index 6a88d404953..bc8c8f01d65 100644 --- a/doc/api/console.md +++ b/doc/api/console.md @@ -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 diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index 5d4a8714430..5b64ca7cd30 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -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). ### DEP0014: fs.read legacy String interface diff --git a/doc/api/dgram.md b/doc/api/dgram.md index b6b974541bd..31eeed43953 100644 --- a/doc/api/dgram.md +++ b/doc/api/dgram.md @@ -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. @@ -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. @@ -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 @@ -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. @@ -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. @@ -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 diff --git a/doc/api/errors.md b/doc/api/errors.md index b36cd241bce..c34559303ca 100644 --- a/doc/api/errors.md +++ b/doc/api/errors.md @@ -1660,7 +1660,7 @@ entry types were found. ### ERR_VALUE_OUT_OF_RANGE -Superseded by `ERR_OUT_OF_RANGE` +Superseded by `ERR_OUT_OF_RANGE`. ### ERR_VM_MODULE_ALREADY_LINKED diff --git a/doc/api/fs.md b/doc/api/fs.md index ee541b78e48..6e3628c8fbb 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -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 @@ -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 @@ -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) ```js diff --git a/doc/api/process.md b/doc/api/process.md index fdea86bf2d9..9c0c26162e8 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -289,7 +289,7 @@ command-line option can be used to suppress the default console output but the `'warning'` event will still be emitted by the `process` object. The following example illustrates the warning that is printed to `stderr` when -too many listeners have been added to an event +too many listeners have been added to an event: ```txt $ node diff --git a/doc/api/readline.md b/doc/api/readline.md index d3afe5d9bf5..ead469e97c9 100644 --- a/doc/api/readline.md +++ b/doc/api/readline.md @@ -90,7 +90,7 @@ The `'pause'` event is emitted when one of the following occur: * The `input` stream is paused. * The `input` stream is not paused and receives the `'SIGCONT'` event. (See - events [`'SIGTSTP'`][] and [`'SIGCONT'`][]) + events [`'SIGTSTP'`][] and [`'SIGCONT'`][].) The listener function is called without passing any arguments. diff --git a/doc/api/repl.md b/doc/api/repl.md index 22312328276..995dabaa5d8 100644 --- a/doc/api/repl.md +++ b/doc/api/repl.md @@ -40,7 +40,7 @@ The following special commands are supported by all REPL instances: `> .save ./file/to/save.js` * `.load` - Load a file into the current REPL session. `> .load ./file/to/load.js` -* `.editor` - Enter editor mode (`-D` to finish, `-C` to cancel) +* `.editor` - Enter editor mode (`-D` to finish, `-C` to cancel). ```js @@ -607,10 +607,11 @@ By starting a REPL from a Unix socket-based server instead of stdin, it is possible to connect to a long-running Node.js process without restarting it. For an example of running a "full-featured" (`terminal`) REPL over -a `net.Server` and `net.Socket` instance, see: https://gist.github.com/2209310 +a `net.Server` and `net.Socket` instance, see: +[https://gist.github.com/2209310](https://gist.github.com/2209310). -For an example of running a REPL instance over [curl(1)][], -see: https://gist.github.com/2053342 +For an example of running a REPL instance over [curl(1)][], see: +[https://gist.github.com/2053342](https://gist.github.com/2053342). [`--experimental-repl-await`]: cli.html#cli_experimental_repl_await [`readline.InterfaceCompleter`]: readline.html#readline_use_of_the_completer_function diff --git a/doc/api/stream.md b/doc/api/stream.md index 8c80816d79e..8af12d12bf0 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -2407,14 +2407,12 @@ The workaround in this situation is to call the ```js // Workaround net.createServer((socket) => { - socket.on('end', () => { socket.end('The message was received but was not processed.\n'); }); // start the flow of data, discarding it. socket.resume(); - }).listen(1337); ``` diff --git a/doc/api/synopsis.md b/doc/api/synopsis.md index 508dde1ff48..ad14fae7b8d 100644 --- a/doc/api/synopsis.md +++ b/doc/api/synopsis.md @@ -88,9 +88,9 @@ $ node hello-world.js An output like this should appear in the terminal to indicate Node.js server is running: - ```console - Server running at http://127.0.0.1:3000/ - ```` +```console +Server running at http://127.0.0.1:3000/ +``` Now, open any preferred web browser and visit `http://127.0.0.1:3000`. diff --git a/doc/api/tls.md b/doc/api/tls.md index beb2ec679e9..bdda8bd7343 100644 --- a/doc/api/tls.md +++ b/doc/api/tls.md @@ -404,7 +404,7 @@ added: v3.0.0 * Returns: {Buffer} Returns a `Buffer` instance holding the keys currently used for -encryption/decryption of the [TLS Session Tickets][] +encryption/decryption of the [TLS Session Tickets][]. ### server.listen() @@ -516,10 +516,9 @@ added: v0.11.4 * Returns: {Object} -Returns the bound address, the address family name, and port of the -underlying socket as reported by the operating system. Returns an -object with three properties, e.g. -`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }` +Returns the bound `address`, the address `family` name, and `port` of the +underlying socket as reported by the operating system: +`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`. ### tlsSocket.authorizationError