diff --git a/doc/api/buffer.md b/doc/api/buffer.md index 0195c1cd2651d8..312b4f7c17f8a3 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 6e26cd8be8d064..a22080b3355f53 100644 --- a/doc/api/child_process.md +++ b/doc/api/child_process.md @@ -654,7 +654,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 @@ -778,7 +778,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.** @@ -1058,7 +1058,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 5de5f0ff6fafd1..50a7b133111615 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -63,7 +63,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` @@ -96,7 +96,7 @@ 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` @@ -104,7 +104,7 @@ Force FIPS-compliant crypto on startup. (Cannot be disabled from script code.) 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]` @@ -270,8 +270,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` diff --git a/doc/api/cluster.md b/doc/api/cluster.md index 04b9eac46c8a92..7c0baa36ff5491 100644 --- a/doc/api/cluster.md +++ b/doc/api/cluster.md @@ -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() -* `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 114d4758af7703..b28c234693214f 100644 --- a/doc/api/console.md +++ b/doc/api/console.md @@ -100,7 +100,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 1c3c488c8d6497..5f71c1124ae15c 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 06c15ffa25c879..d0ccc6695e8883 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. @@ -480,7 +480,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 @@ -496,7 +496,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. @@ -506,7 +506,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. @@ -516,7 +516,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 8aadb608f2c43b..d53066f437dafa 100644 --- a/doc/api/errors.md +++ b/doc/api/errors.md @@ -1666,7 +1666,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 d585164faf68df..39517094a3abbe 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 bc8c1000026d26..f12f7c728302d8 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -290,7 +290,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 c1e50ef7eee350..7eac3596465fe7 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 22312328276f5a..995dabaa5d863d 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 23de6a31ef2006..ddba19a4f4b1ae 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 508dde1ff483f8..ad14fae7b8d791 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 0f9e46f2474d57..081ca45c385b4a 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() @@ -517,10 +517,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