| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 0bd78dc commit ae86adc
34 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -102,7 +102,7 @@ Addon module name is `addon`. | |||
| 102 | 102 | Once the source code has been written, it must be compiled into the binary | |
| 103 | 103 | `addon.node` file. To do so, create a file called `binding.gyp` in the | |
| 104 | 104 | top-level of the project describing the build configuration of the module | |
| 105 | - using a JSON-like format. This file is used by [node-gyp][] -- a tool written | ||
| 105 | + using a JSON-like format. This file is used by [node-gyp][] — a tool written | ||
| 106 | 106 | specifically to compile Node.js Addons. | |
| 107 | 107 | ||
| 108 | 108 | ```json | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -636,7 +636,7 @@ asyncResource.emitAfter(); | |||
| 636 | 636 | * `type` {string} The type of async event. | |
| 637 | 637 | * `options` {Object} | |
| 638 | 638 | * `triggerAsyncId` {number} The ID of the execution context that created this | |
| 639 | - async event. **Default:** `executionAsyncId()` | ||
| 639 | + async event. **Default:** `executionAsyncId()`. | ||
| 640 | 640 | * `requireManualDestroy` {boolean} Disables automatic `emitDestroy` when the | |
| 641 | 641 | object is garbage collected. This usually does not need to be set (even if | |
| 642 | 642 | `emitDestroy` is called manually), unless the resource's asyncId is retrieved | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -59,7 +59,7 @@ differently based on what arguments are provided: | |||
| 59 | 59 | entire `Buffer`. While this behavior is *intentional* to improve performance, | |
| 60 | 60 | development experience has demonstrated that a more explicit distinction is | |
| 61 | 61 | required between creating a fast-but-uninitialized `Buffer` versus creating a | |
| 62 | - slower-but-safer `Buffer`. Starting in Node.js 8.0.0, `Buffer(num)` and | ||
| 62 | + slower-but-safer `Buffer`. Starting in Node.js 8.0.0, `Buffer(num)` and | ||
| 63 | 63 | `new Buffer(num)` will return a `Buffer` with initialized memory. | |
| 64 | 64 | * Passing a string, array, or `Buffer` as the first argument copies the | |
| 65 | 65 | passed object's data into the `Buffer`. | |
@@ -426,7 +426,7 @@ changes: | |||
| 426 | 426 | ||
| 427 | 427 | * `size` {integer} The desired length of the new `Buffer`. | |
| 428 | 428 | ||
| 429 | - Allocates a new `Buffer` of `size` bytes. If the `size` is larger than | ||
| 429 | + Allocates a new `Buffer` of `size` bytes. If the `size` is larger than | ||
| 430 | 430 | [`buffer.constants.MAX_LENGTH`] or smaller than 0, a [`RangeError`] will be | |
| 431 | 431 | thrown. A zero-length `Buffer` will be created if `size` is 0. | |
| 432 | 432 | ||
@@ -502,7 +502,7 @@ console.log(buf); | |||
| 502 | 502 | // Prints: <Buffer 00 00 00 00 00> | |
| 503 | 503 | ``` | |
| 504 | 504 | ||
| 505 | - Allocates a new `Buffer` of `size` bytes. If the `size` is larger than | ||
| 505 | + Allocates a new `Buffer` of `size` bytes. If the `size` is larger than | ||
| 506 | 506 | [`buffer.constants.MAX_LENGTH`] or smaller than 0, a [`RangeError`] will be | |
| 507 | 507 | thrown. A zero-length `Buffer` will be created if `size` is 0. | |
| 508 | 508 | ||
@@ -543,7 +543,7 @@ changes: | |||
| 543 | 543 | ||
| 544 | 544 | * `size` {integer} The desired length of the new `Buffer`. | |
| 545 | 545 | ||
| 546 | - Allocates a new `Buffer` of `size` bytes. If the `size` is larger than | ||
| 546 | + Allocates a new `Buffer` of `size` bytes. If the `size` is larger than | ||
| 547 | 547 | [`buffer.constants.MAX_LENGTH`] or smaller than 0, a [`RangeError`] will be | |
| 548 | 548 | thrown. A zero-length `Buffer` will be created if `size` is 0. | |
| 549 | 549 | ||
@@ -587,7 +587,7 @@ added: v5.12.0 | |||
| 587 | 587 | ||
| 588 | 588 | * `size` {integer} The desired length of the new `Buffer`. | |
| 589 | 589 | ||
| 590 | - Allocates a new `Buffer` of `size` bytes. If the `size` is larger than | ||
| 590 | + Allocates a new `Buffer` of `size` bytes. If the `size` is larger than | ||
| 591 | 591 | [`buffer.constants.MAX_LENGTH`] or smaller than 0, a [`RangeError`] will be | |
| 592 | 592 | thrown. A zero-length `Buffer` will be created if `size` is 0. | |
| 593 | 593 | ||
@@ -2458,7 +2458,7 @@ deprecated: v6.0.0 | |||
| 2458 | 2458 | ||
| 2459 | 2459 | * `size` {integer} The desired length of the new `SlowBuffer`. | |
| 2460 | 2460 | ||
| 2461 | - Allocates a new `Buffer` of `size` bytes. If the `size` is larger than | ||
| 2461 | + Allocates a new `Buffer` of `size` bytes. If the `size` is larger than | ||
| 2462 | 2462 | [`buffer.constants.MAX_LENGTH`] or smaller than 0, a [`RangeError`] will be | |
| 2463 | 2463 | thrown. A zero-length `Buffer` will be created if `size` is 0. | |
| 2464 | 2464 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -41,7 +41,7 @@ the event loop until the spawned process either exits or is terminated. | |||
| 41 | 41 | ||
| 42 | 42 | For convenience, the `child_process` module provides a handful of synchronous | |
| 43 | 43 | and asynchronous alternatives to [`child_process.spawn()`][] and | |
| 44 | - [`child_process.spawnSync()`][]. *Note that each of these alternatives are | ||
| 44 | + [`child_process.spawnSync()`][]. *Note that each of these alternatives are | ||
| 45 | 45 | implemented on top of [`child_process.spawn()`][] or [`child_process.spawnSync()`][].* | |
| 46 | 46 | ||
| 47 | 47 | * [`child_process.exec()`][]: spawns a shell and runs a command within that shell, | |
@@ -146,8 +146,8 @@ changes: | |||
| 146 | 146 | [Shell Requirements][] and [Default Windows Shell][]. | |
| 147 | 147 | * `timeout` {number} **Default:** `0` | |
| 148 | 148 | * `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or | |
| 149 | - stderr. **Default:** `200*1024`. If exceeded, the child process is terminated. | ||
| 150 | - See caveat at [`maxBuffer` and Unicode][]. | ||
| 149 | + stderr. If exceeded, the child process is terminated. See caveat at | ||
| 150 | + [`maxBuffer` and Unicode][]. **Default:** `200 * 1024`. | ||
| 151 | 151 | * `killSignal` {string|integer} **Default:** `'SIGTERM'` | |
| 152 | 152 | * `uid` {number} Sets the user identity of the process (see setuid(2)). | |
| 153 | 153 | * `gid` {number} Sets the group identity of the process (see setgid(2)). | |
@@ -189,7 +189,7 @@ exec('cat *.js bad_file | wc -l', (error, stdout, stderr) => { | |||
| 189 | 189 | ``` | |
| 190 | 190 | ||
| 191 | 191 | If a `callback` function is provided, it is called with the arguments | |
| 192 | - `(error, stdout, stderr)`. On success, `error` will be `null`. On error, | ||
| 192 | + `(error, stdout, stderr)`. On success, `error` will be `null`. On error, | ||
| 193 | 193 | `error` will be an instance of [`Error`][]. The `error.code` property will be | |
| 194 | 194 | the exit code of the child process while `error.signal` will be set to the | |
| 195 | 195 | signal that terminated the process. Any exit code other than `0` is considered | |
@@ -258,8 +258,8 @@ changes: | |||
| 258 | 258 | * `encoding` {string} **Default:** `'utf8'` | |
| 259 | 259 | * `timeout` {number} **Default:** `0` | |
| 260 | 260 | * `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or | |
| 261 | - stderr. **Default:** `200*1024` If exceeded, the child process is terminated. | ||
| 262 | - See caveat at [`maxBuffer` and Unicode][]. | ||
| 261 | + stderr. If exceeded, the child process is terminated. See caveat at | ||
| 262 | + [`maxBuffer` and Unicode][]. **Default:** `200 * 1024`. | ||
| 263 | 263 | * `killSignal` {string|integer} **Default:** `'SIGTERM'` | |
| 264 | 264 | * `uid` {number} Sets the user identity of the process (see setuid(2)). | |
| 265 | 265 | * `gid` {number} Sets the group identity of the process (see setgid(2)). | |
@@ -538,7 +538,7 @@ disabled*. | |||
| 538 | 538 | On non-Windows platforms, if `options.detached` is set to `true`, the child | |
| 539 | 539 | process will be made the leader of a new process group and session. Note that | |
| 540 | 540 | child processes may continue running after the parent exits regardless of | |
| 541 | - whether they are detached or not. See setsid(2) for more information. | ||
| 541 | + whether they are detached or not. See setsid(2) for more information. | ||
| 542 | 542 | ||
| 543 | 543 | By default, the parent will wait for the detached child to exit. To prevent | |
| 544 | 544 | the parent from waiting for a given `subprocess`, use the `subprocess.unref()` | |
@@ -712,9 +712,10 @@ changes: | |||
| 712 | 712 | * `killSignal` {string|integer} The signal value to be used when the spawned | |
| 713 | 713 | process will be killed. **Default:** `'SIGTERM'` | |
| 714 | 714 | * `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or | |
| 715 | - stderr. **Default:** `200*1024` If exceeded, the child process is terminated. | ||
| 716 | - See caveat at [`maxBuffer` and Unicode][]. | ||
| 717 | - * `encoding` {string} The encoding used for all stdio inputs and outputs. **Default:** `'buffer'` | ||
| 715 | + stderr. If exceeded, the child process is terminated. See caveat at | ||
| 716 | + [`maxBuffer` and Unicode][]. **Default:** `200 * 1024`. | ||
| 717 | + * `encoding` {string} The encoding used for all stdio inputs and outputs. | ||
| 718 | + **Default:** `'buffer'`. | ||
| 718 | 719 | * `windowsHide` {boolean} Hide the subprocess console window that would | |
| 719 | 720 | normally be created on Windows systems. **Default:** `false`. | |
| 720 | 721 | * `shell` {boolean|string} If `true`, runs `command` inside of a shell. Uses | |
@@ -773,8 +774,8 @@ changes: | |||
| 773 | 774 | * `killSignal` {string|integer} The signal value to be used when the spawned | |
| 774 | 775 | process will be killed. **Default:** `'SIGTERM'` | |
| 775 | 776 | * `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or | |
| 776 | - stderr. **Default:** `200*1024` If exceeded, the child process is terminated. | ||
| 777 | - See caveat at [`maxBuffer` and Unicode][]. | ||
| 777 | + stderr. If exceeded, the child process is terminated. See caveat at | ||
| 778 | + [`maxBuffer` and Unicode][]. **Default:** `200 * 1024`. | ||
| 778 | 779 | * `encoding` {string} The encoding used for all stdio inputs and outputs. | |
| 779 | 780 | **Default:** `'buffer'` | |
| 780 | 781 | * `windowsHide` {boolean} Hide the subprocess console window that would | |
@@ -785,12 +786,12 @@ The `child_process.execSync()` method is generally identical to | |||
| 785 | 786 | [`child_process.exec()`][] with the exception that the method will not return until | |
| 786 | 787 | the child process has fully closed. When a timeout has been encountered and | |
| 787 | 788 | `killSignal` is sent, the method won't return until the process has completely | |
| 788 | - exited. *Note that if the child process intercepts and handles the `SIGTERM` | ||
| 789 | + exited. *Note that if the child process intercepts and handles the `SIGTERM` | ||
| 789 | 790 | signal and doesn't exit, the parent process will wait until the child | |
| 790 | 791 | process has exited.* | |
| 791 | 792 | ||
| 792 | 793 | If the process times out or has a non-zero exit code, this method ***will*** | |
| 793 | - throw. The [`Error`][] object will contain the entire result from | ||
| 794 | + throw. The [`Error`][] object will contain the entire result from | ||
| 794 | 795 | [`child_process.spawnSync()`][] | |
| 795 | 796 | ||
| 796 | 797 | **Never pass unsanitized user input to this function. Any input containing shell | |
@@ -830,8 +831,8 @@ changes: | |||
| 830 | 831 | * `killSignal` {string|integer} The signal value to be used when the spawned | |
| 831 | 832 | process will be killed. **Default:** `'SIGTERM'` | |
| 832 | 833 | * `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or | |
| 833 | - stderr. **Default:** `200*1024` If exceeded, the child process is terminated. | ||
| 834 | - See caveat at [`maxBuffer` and Unicode][]. | ||
| 834 | + stderr. If exceeded, the child process is terminated. See caveat at | ||
| 835 | + [`maxBuffer` and Unicode][]. **Default:** `200 * 1024`. | ||
| 835 | 836 | * `encoding` {string} The encoding used for all stdio inputs and outputs. | |
| 836 | 837 | **Default:** `'buffer'` | |
| 837 | 838 | * `shell` {boolean|string} If `true`, runs `command` inside of a shell. Uses | |
@@ -1168,7 +1169,7 @@ properties: | |||
| 1168 | 1169 | Defaults to `false`. | |
| 1169 | 1170 | ||
| 1170 | 1171 | The optional `callback` is a function that is invoked after the message is | |
| 1171 | - sent but before the child may have received it. The function is called with a | ||
| 1172 | + sent but before the child may have received it. The function is called with a | ||
| 1172 | 1173 | single argument: `null` on success, or an [`Error`][] object on failure. | |
| 1173 | 1174 | ||
| 1174 | 1175 | If no `callback` function is provided and the message cannot be sent, an | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -517,7 +517,7 @@ added: v3.0.0 | |||
| 517 | 517 | ||
| 518 | 518 | Path to the file used to store the persistent REPL history. The default path is | |
| 519 | 519 | `~/.node_repl_history`, which is overridden by this variable. Setting the value | |
| 520 | - to an empty string (`""` or `" "`) disables persistent REPL history. | ||
| 520 | + to an empty string (`''` or `' '`) disables persistent REPL history. | ||
| 521 | 521 | ||
| 522 | 522 | ||
| 523 | 523 | ### `NODE_EXTRA_CA_CERTS=file` | |
@@ -602,7 +602,7 @@ reason any of these APIs takes a long time, other (seemingly unrelated) APIs | |||
| 602 | 602 | that run in libuv's threadpool will experience degraded performance. In order to | |
| 603 | 603 | mitigate this issue, one potential solution is to increase the size of libuv's | |
| 604 | 604 | threadpool by setting the `'UV_THREADPOOL_SIZE'` environment variable to a value | |
| 605 | - greater than `4` (its current default value). For more information, see the | ||
| 605 | + greater than `4` (its current default value). For more information, see the | ||
| 606 | 606 | [libuv threadpool documentation][]. | |
| 607 | 607 | ||
| 608 | 608 | [`--openssl-config`]: #cli_openssl_config_file | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -93,7 +93,7 @@ Node.js process and a cluster worker differs: | |||
| 93 | 93 | process. | |
| 94 | 94 | 3. `server.listen(0)` Normally, this will cause servers to listen on a | |
| 95 | 95 | random port. However, in a cluster, each worker will receive the | |
| 96 | - same "random" port each time they do `listen(0)`. In essence, the | ||
| 96 | + same "random" port each time they do `listen(0)`. In essence, the | ||
| 97 | 97 | port is random the first time, but predictable thereafter. To listen | |
| 98 | 98 | on a unique port, generate a port number based on the cluster worker ID. | |
| 99 | 99 | ||
@@ -103,8 +103,8 @@ things like sessions and login. | |||
| 103 | 103 | ||
| 104 | 104 | Because workers are all separate processes, they can be killed or | |
| 105 | 105 | re-spawned depending on a program's needs, without affecting other | |
| 106 | - workers. As long as there are some workers still alive, the server will | ||
| 107 | - continue to accept connections. If no workers are alive, existing connections | ||
| 106 | + workers. As long as there are some workers still alive, the server will | ||
| 107 | + continue to accept connections. If no workers are alive, existing connections | ||
| 108 | 108 | will be dropped and new connections will be refused. Node.js does not | |
| 109 | 109 | automatically manage the number of workers, however. It is the application's | |
| 110 | 110 | responsibility to manage the worker pool based on its own needs. | |
@@ -465,8 +465,8 @@ Emitted after the worker IPC channel has disconnected. This can occur when a | |||
| 465 | 465 | worker exits gracefully, is killed, or is disconnected manually (such as with | |
| 466 | 466 | worker.disconnect()). | |
| 467 | 467 | ||
| 468 | - There may be a delay between the `'disconnect'` and `'exit'` events. These | ||
| 469 | - events can be used to detect if the process is stuck in a cleanup or if there | ||
| 468 | + There may be a delay between the `'disconnect'` and `'exit'` events. These | ||
| 469 | + events can be used to detect if the process is stuck in a cleanup or if there | ||
| 470 | 470 | are long-living connections. | |
| 471 | 471 | ||
| 472 | 472 | ```js | |
@@ -556,7 +556,7 @@ The `addressType` is one of: | |||
| 556 | 556 | * `4` (TCPv4) | |
| 557 | 557 | * `6` (TCPv6) | |
| 558 | 558 | * `-1` (unix domain socket) | |
| 559 | - * `"udp4"` or `"udp6"` (UDP v4 or v6) | ||
| 559 | + * `'udp4'` or `'udp6'` (UDP v4 or v6) | ||
| 560 | 560 | ||
| 561 | 561 | ## Event: 'message' | |
| 562 | 562 | <!-- YAML | |
@@ -692,7 +692,7 @@ distribute IOCP handles without incurring a large performance hit. | |||
| 692 | 692 | ||
| 693 | 693 | `cluster.schedulingPolicy` can also be set through the | |
| 694 | 694 | `NODE_CLUSTER_SCHED_POLICY` environment variable. Valid | |
| 695 | - values are `"rr"` and `"none"`. | ||
| 695 | + values are `'rr'` and `'none'`. | ||
| 696 | 696 | ||
| 697 | 697 | ## cluster.settings | |
| 698 | 698 | <!-- YAML | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,7 +12,7 @@ The module exports two specific components: | |||
| 12 | 12 | * A `Console` class with methods such as `console.log()`, `console.error()` and | |
| 13 | 13 | `console.warn()` that can be used to write to any Node.js stream. | |
| 14 | 14 | * A global `console` instance configured to write to [`process.stdout`][] and | |
| 15 | - [`process.stderr`][]. The global `console` can be used without calling | ||
| 15 | + [`process.stderr`][]. The global `console` can be used without calling | ||
| 16 | 16 | `require('console')`. | |
| 17 | 17 | ||
| 18 | 18 | ***Warning***: The global console object's methods are neither consistently | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -301,7 +301,7 @@ Updates the cipher with `data`. If the `inputEncoding` argument is given, | |||
| 301 | 301 | its value must be one of `'utf8'`, `'ascii'`, or `'latin1'` and the `data` | |
| 302 | 302 | argument is a string using the specified encoding. If the `inputEncoding` | |
| 303 | 303 | argument is not given, `data` must be a [`Buffer`][], `TypedArray`, or | |
| 304 | - `DataView`. If `data` is a [`Buffer`][], `TypedArray`, or `DataView`, then | ||
| 304 | + `DataView`. If `data` is a [`Buffer`][], `TypedArray`, or `DataView`, then | ||
| 305 | 305 | `inputEncoding` is ignored. | |
| 306 | 306 | ||
| 307 | 307 | The `outputEncoding` specifies the output format of the enciphered | |
@@ -552,7 +552,7 @@ added: v0.5.0 | |||
| 552 | 552 | - `encoding` {string} | |
| 553 | 553 | ||
| 554 | 554 | Returns the Diffie-Hellman generator in the specified `encoding`, which can | |
| 555 | - be `'latin1'`, `'hex'`, or `'base64'`. If `encoding` is provided a string is | ||
| 555 | + be `'latin1'`, `'hex'`, or `'base64'`. If `encoding` is provided a string is | ||
| 556 | 556 | returned; otherwise a [`Buffer`][] is returned. | |
| 557 | 557 | ||
| 558 | 558 | ### diffieHellman.getPrime([encoding]) | |
@@ -1716,8 +1716,8 @@ const key = crypto.pbkdf2Sync('secret', 'salt', 100000, 64, 'sha512'); | |||
| 1716 | 1716 | console.log(key.toString('hex')); // '3745e48...08d59ae' | |
| 1717 | 1717 | ``` | |
| 1718 | 1718 | ||
| 1719 | - The `crypto.DEFAULT_ENCODING` may be used to change the way the `derivedKey` | ||
| 1720 | - is returned: | ||
| 1719 | + The `crypto.DEFAULT_ENCODING` property may be used to change the way the | ||
| 1720 | + `derivedKey` is returned. | ||
| 1721 | 1721 | ||
| 1722 | 1722 | ```js | |
| 1723 | 1723 | const crypto = require('crypto'); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -70,7 +70,7 @@ debug> repl | |||
| 70 | 70 | Press Ctrl + C to leave debug repl | |
| 71 | 71 | > x | |
| 72 | 72 | 5 | |
| 73 | - > 2+2 | ||
| 73 | + > 2 + 2 | ||
| 74 | 74 | 4 | |
| 75 | 75 | debug> next | |
| 76 | 76 | < world | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -699,8 +699,8 @@ Type: Runtime | |||
| 699 | 699 | ||
| 700 | 700 | `Module._debug()` has been deprecated. | |
| 701 | 701 | ||
| 702 | - The `Module._debug()` function was never documented as an officially supported | ||
| 703 | - API. | ||
| 702 | + The `Module._debug()` function was never documented as an officially | ||
| 703 | + supported API. | ||
| 704 | 704 | ||
| 705 | 705 | <a id="DEP0078"></a> | |
| 706 | 706 | ### DEP0078: REPLServer.turnOffEditorMode() | |
| Back | FazBrowse Home | New Git URL |
0 commit comments