| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 333d7dd commit c897815
33 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -101,7 +101,7 @@ Addon module name is `addon`. | |||
| 101 | 101 | Once the source code has been written, it must be compiled into the binary | |
| 102 | 102 | `addon.node` file. To do so, create a file called `binding.gyp` in the | |
| 103 | 103 | top-level of the project describing the build configuration of the module | |
| 104 | - using a JSON-like format. This file is used by [node-gyp][] -- a tool written | ||
| 104 | + using a JSON-like format. This file is used by [node-gyp][] — a tool written | ||
| 105 | 105 | specifically to compile Node.js Addons. | |
| 106 | 106 | ||
| 107 | 107 | ```json | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -582,7 +582,7 @@ asyncResource.triggerAsyncId(); | |||
| 582 | 582 | * `type` {string} The type of async event. | |
| 583 | 583 | * `options` {Object} | |
| 584 | 584 | * `triggerAsyncId` {number} The ID of the execution context that created this | |
| 585 | - async event. **Default:** `executionAsyncId()` | ||
| 585 | + async event. **Default:** `executionAsyncId()` | ||
| 586 | 586 | * `requireManualDestroy` {boolean} Disables automatic `emitDestroy` when the | |
| 587 | 587 | object is garbage collected. This usually does not need to be set (even if | |
| 588 | 588 | `emitDestroy` is called manually), unless the resource's asyncId is retrieved | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -449,7 +449,7 @@ changes: | |||
| 449 | 449 | ||
| 450 | 450 | * `size` {integer} The desired length of the new `Buffer`. | |
| 451 | 451 | ||
| 452 | - Allocates a new `Buffer` of `size` bytes. If the `size` is larger than | ||
| 452 | + Allocates a new `Buffer` of `size` bytes. If the `size` is larger than | ||
| 453 | 453 | [`buffer.constants.MAX_LENGTH`] or smaller than 0, a [`RangeError`] will be | |
| 454 | 454 | thrown. A zero-length `Buffer` will be created if `size` is 0. | |
| 455 | 455 | ||
@@ -535,7 +535,7 @@ const buf = Buffer.alloc(5); | |||
| 535 | 535 | console.log(buf); | |
| 536 | 536 | ``` | |
| 537 | 537 | ||
| 538 | - Allocates a new `Buffer` of `size` bytes. If the `size` is larger than | ||
| 538 | + Allocates a new `Buffer` of `size` bytes. If the `size` is larger than | ||
| 539 | 539 | [`buffer.constants.MAX_LENGTH`] or smaller than 0, a [`RangeError`] will be | |
| 540 | 540 | thrown. A zero-length `Buffer` will be created if `size` is 0. | |
| 541 | 541 | ||
@@ -580,7 +580,7 @@ changes: | |||
| 580 | 580 | ||
| 581 | 581 | * `size` {integer} The desired length of the new `Buffer`. | |
| 582 | 582 | ||
| 583 | - Allocates a new `Buffer` of `size` bytes. If the `size` is larger than | ||
| 583 | + Allocates a new `Buffer` of `size` bytes. If the `size` is larger than | ||
| 584 | 584 | [`buffer.constants.MAX_LENGTH`] or smaller than 0, a [`RangeError`] will be | |
| 585 | 585 | thrown. A zero-length `Buffer` will be created if `size` is 0. | |
| 586 | 586 | ||
@@ -626,7 +626,7 @@ added: v5.12.0 | |||
| 626 | 626 | ||
| 627 | 627 | * `size` {integer} The desired length of the new `Buffer`. | |
| 628 | 628 | ||
| 629 | - Allocates a new `Buffer` of `size` bytes. If the `size` is larger than | ||
| 629 | + Allocates a new `Buffer` of `size` bytes. If the `size` is larger than | ||
| 630 | 630 | [`buffer.constants.MAX_LENGTH`] or smaller than 0, a [`RangeError`] will be | |
| 631 | 631 | thrown. A zero-length `Buffer` will be created if `size` is 0. | |
| 632 | 632 | ||
@@ -2660,7 +2660,7 @@ deprecated: v6.0.0 | |||
| 2660 | 2660 | ||
| 2661 | 2661 | * `size` {integer} The desired length of the new `SlowBuffer`. | |
| 2662 | 2662 | ||
| 2663 | - Allocates a new `Buffer` of `size` bytes. If the `size` is larger than | ||
| 2663 | + Allocates a new `Buffer` of `size` bytes. If the `size` is larger than | ||
| 2664 | 2664 | [`buffer.constants.MAX_LENGTH`] or smaller than 0, a [`RangeError`] will be | |
| 2665 | 2665 | thrown. A zero-length `Buffer` will be created if `size` is 0. | |
| 2666 | 2666 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -38,7 +38,7 @@ the event loop until the spawned process either exits or is terminated. | |||
| 38 | 38 | ||
| 39 | 39 | For convenience, the `child_process` module provides a handful of synchronous | |
| 40 | 40 | and asynchronous alternatives to [`child_process.spawn()`][] and | |
| 41 | - [`child_process.spawnSync()`][]. *Note that each of these alternatives are | ||
| 41 | + [`child_process.spawnSync()`][]. *Note that each of these alternatives are | ||
| 42 | 42 | implemented on top of [`child_process.spawn()`][] or [`child_process.spawnSync()`][].* | |
| 43 | 43 | ||
| 44 | 44 | * [`child_process.exec()`][]: spawns a shell and runs a command within that shell, | |
@@ -143,8 +143,8 @@ changes: | |||
| 143 | 143 | [Shell Requirements][] and [Default Windows Shell][]. | |
| 144 | 144 | * `timeout` {number} **Default:** `0` | |
| 145 | 145 | * `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or | |
| 146 | - stderr. **Default:** `200*1024`. If exceeded, the child process is terminated. | ||
| 147 | - See caveat at [`maxBuffer` and Unicode][]. | ||
| 146 | + stderr. **Default:** `200 * 1024`. If exceeded, the child process is | ||
| 147 | + terminated. See caveat at [`maxBuffer` and Unicode][]. | ||
| 148 | 148 | * `killSignal` {string|integer} **Default:** `'SIGTERM'` | |
| 149 | 149 | * `uid` {number} Sets the user identity of the process (see setuid(2)). | |
| 150 | 150 | * `gid` {number} Sets the group identity of the process (see setgid(2)). | |
@@ -187,7 +187,7 @@ exec('cat *.js bad_file | wc -l', (error, stdout, stderr) => { | |||
| 187 | 187 | ``` | |
| 188 | 188 | ||
| 189 | 189 | If a `callback` function is provided, it is called with the arguments | |
| 190 | - `(error, stdout, stderr)`. On success, `error` will be `null`. On error, | ||
| 190 | + `(error, stdout, stderr)`. On success, `error` will be `null`. On error, | ||
| 191 | 191 | `error` will be an instance of [`Error`][]. The `error.code` property will be | |
| 192 | 192 | the exit code of the child process while `error.signal` will be set to the | |
| 193 | 193 | signal that terminated the process. Any exit code other than `0` is considered | |
@@ -257,8 +257,8 @@ changes: | |||
| 257 | 257 | * `encoding` {string} **Default:** `'utf8'` | |
| 258 | 258 | * `timeout` {number} **Default:** `0` | |
| 259 | 259 | * `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or | |
| 260 | - stderr. **Default:** `200*1024` If exceeded, the child process is terminated. | ||
| 261 | - See caveat at [`maxBuffer` and Unicode][]. | ||
| 260 | + stderr. **Default:** `200 * 1024` If exceeded, the child process is | ||
| 261 | + terminated. See caveat at [`maxBuffer` and Unicode][]. | ||
| 262 | 262 | * `killSignal` {string|integer} **Default:** `'SIGTERM'` | |
| 263 | 263 | * `uid` {number} Sets the user identity of the process (see setuid(2)). | |
| 264 | 264 | * `gid` {number} Sets the group identity of the process (see setgid(2)). | |
@@ -536,7 +536,7 @@ disabled*. | |||
| 536 | 536 | On non-Windows platforms, if `options.detached` is set to `true`, the child | |
| 537 | 537 | process will be made the leader of a new process group and session. Note that | |
| 538 | 538 | child processes may continue running after the parent exits regardless of | |
| 539 | - whether they are detached or not. See setsid(2) for more information. | ||
| 539 | + whether they are detached or not. See setsid(2) for more information. | ||
| 540 | 540 | ||
| 541 | 541 | By default, the parent will wait for the detached child to exit. To prevent | |
| 542 | 542 | the parent from waiting for a given `subprocess`, use the `subprocess.unref()` | |
@@ -706,8 +706,8 @@ changes: | |||
| 706 | 706 | * `killSignal` {string|integer} The signal value to be used when the spawned | |
| 707 | 707 | process will be killed. **Default:** `'SIGTERM'` | |
| 708 | 708 | * `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or | |
| 709 | - stderr. **Default:** `200*1024` If exceeded, the child process is terminated. | ||
| 710 | - See caveat at [`maxBuffer` and Unicode][]. | ||
| 709 | + stderr. **Default:** `200 * 1024` If exceeded, the child process is | ||
| 710 | + terminated. See caveat at [`maxBuffer` and Unicode][]. | ||
| 711 | 711 | * `encoding` {string} The encoding used for all stdio inputs and outputs. **Default:** `'buffer'` | |
| 712 | 712 | * `windowsHide` {boolean} Hide the subprocess console window that would | |
| 713 | 713 | normally be created on Windows systems. **Default:** `false`. | |
@@ -767,8 +767,8 @@ changes: | |||
| 767 | 767 | * `killSignal` {string|integer} The signal value to be used when the spawned | |
| 768 | 768 | process will be killed. **Default:** `'SIGTERM'` | |
| 769 | 769 | * `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or | |
| 770 | - stderr. **Default:** `200*1024` If exceeded, the child process is terminated. | ||
| 771 | - See caveat at [`maxBuffer` and Unicode][]. | ||
| 770 | + stderr. **Default:** `200 * 1024` If exceeded, the child process is | ||
| 771 | + terminated. See caveat at [`maxBuffer` and Unicode][]. | ||
| 772 | 772 | * `encoding` {string} The encoding used for all stdio inputs and outputs. | |
| 773 | 773 | **Default:** `'buffer'` | |
| 774 | 774 | * `windowsHide` {boolean} Hide the subprocess console window that would | |
@@ -779,12 +779,12 @@ The `child_process.execSync()` method is generally identical to | |||
| 779 | 779 | [`child_process.exec()`][] with the exception that the method will not return until | |
| 780 | 780 | the child process has fully closed. When a timeout has been encountered and | |
| 781 | 781 | `killSignal` is sent, the method won't return until the process has completely | |
| 782 | - exited. *Note that if the child process intercepts and handles the `SIGTERM` | ||
| 782 | + exited. *Note that if the child process intercepts and handles the `SIGTERM` | ||
| 783 | 783 | signal and doesn't exit, the parent process will wait until the child | |
| 784 | 784 | process has exited.* | |
| 785 | 785 | ||
| 786 | 786 | If the process times out or has a non-zero exit code, this method ***will*** | |
| 787 | - throw. The [`Error`][] object will contain the entire result from | ||
| 787 | + throw. The [`Error`][] object will contain the entire result from | ||
| 788 | 788 | [`child_process.spawnSync()`][] | |
| 789 | 789 | ||
| 790 | 790 | *Note*: Never pass unsanitized user input to this function. Any input | |
@@ -825,8 +825,8 @@ changes: | |||
| 825 | 825 | * `killSignal` {string|integer} The signal value to be used when the spawned | |
| 826 | 826 | process will be killed. **Default:** `'SIGTERM'` | |
| 827 | 827 | * `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or | |
| 828 | - stderr. **Default:** `200*1024` If exceeded, the child process is terminated. | ||
| 829 | - See caveat at [`maxBuffer` and Unicode][]. | ||
| 828 | + stderr. **Default:** `200 * 1024` If exceeded, the child process is | ||
| 829 | + terminated. See caveat at [`maxBuffer` and Unicode][]. | ||
| 830 | 830 | * `encoding` {string} The encoding used for all stdio inputs and outputs. | |
| 831 | 831 | **Default:** `'buffer'` | |
| 832 | 832 | * `shell` {boolean|string} If `true`, runs `command` inside of a shell. Uses | |
@@ -1169,7 +1169,7 @@ properties: | |||
| 1169 | 1169 | Defaults to `false`. | |
| 1170 | 1170 | ||
| 1171 | 1171 | The optional `callback` is a function that is invoked after the message is | |
| 1172 | - 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 | ||
| 1173 | 1173 | single argument: `null` on success, or an [`Error`][] object on failure. | |
| 1174 | 1174 | ||
| 1175 | 1175 | If no `callback` function is provided and the message cannot be sent, an | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -454,7 +454,7 @@ added: v8.0.0 | |||
| 454 | 454 | ||
| 455 | 455 | A space-separated list of command line options. `options...` are interpreted as | |
| 456 | 456 | if they had been specified on the command line before the actual command line | |
| 457 | - (so they can be overridden). Node will exit with an error if an option that is | ||
| 457 | + (so they can be overridden). Node will exit with an error if an option that is | ||
| 458 | 458 | not allowed in the environment is used, such as `-p` or a script file. | |
| 459 | 459 | ||
| 460 | 460 | Node options that are allowed are: | |
@@ -516,7 +516,7 @@ added: v3.0.0 | |||
| 516 | 516 | ||
| 517 | 517 | Path to the file used to store the persistent REPL history. The default path is | |
| 518 | 518 | `~/.node_repl_history`, which is overridden by this variable. Setting the value | |
| 519 | - to an empty string (`""` or `" "`) disables persistent REPL history. | ||
| 519 | + to an empty string (`''` or `' '`) disables persistent REPL history. | ||
| 520 | 520 | ||
| 521 | 521 | ||
| 522 | 522 | ### `NODE_EXTRA_CA_CERTS=file` | |
@@ -601,7 +601,7 @@ reason any of these APIs takes a long time, other (seemingly unrelated) APIs | |||
| 601 | 601 | that run in libuv's threadpool will experience degraded performance. In order to | |
| 602 | 602 | mitigate this issue, one potential solution is to increase the size of libuv's | |
| 603 | 603 | threadpool by setting the `'UV_THREADPOOL_SIZE'` environment variable to a value | |
| 604 | - greater than `4` (its current default value). For more information, see the | ||
| 604 | + greater than `4` (its current default value). For more information, see the | ||
| 605 | 605 | [libuv threadpool documentation][]. | |
| 606 | 606 | ||
| 607 | 607 | [`--openssl-config`]: #cli_openssl_config_file | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -92,8 +92,8 @@ Node.js process and a cluster worker differs: | |||
| 92 | 92 | the worker to use the supplied handle, rather than talk to the master | |
| 93 | 93 | process. | |
| 94 | 94 | 3. `server.listen(0)` Normally, this will cause servers to listen on a | |
| 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 | ||
| 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 | ||
| 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 @@ objects for 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. | |
@@ -499,7 +499,7 @@ Emitted after the worker IPC channel has disconnected. This can occur when a | |||
| 499 | 499 | worker exits gracefully, is killed, or is disconnected manually (such as with | |
| 500 | 500 | worker.disconnect()). | |
| 501 | 501 | ||
| 502 | - There may be a delay between the `'disconnect'` and `'exit'` events. These events | ||
| 502 | + There may be a delay between the `'disconnect'` and `'exit'` events. These events | ||
| 503 | 503 | can be used to detect if the process is stuck in a cleanup or if there are | |
| 504 | 504 | long-living connections. | |
| 505 | 505 | ||
@@ -590,7 +590,7 @@ The `addressType` is one of: | |||
| 590 | 590 | * `4` (TCPv4) | |
| 591 | 591 | * `6` (TCPv6) | |
| 592 | 592 | * `-1` (unix domain socket) | |
| 593 | - * `"udp4"` or `"udp6"` (UDP v4 or v6) | ||
| 593 | + * `'udp4'` or `'udp6'` (UDP v4 or v6) | ||
| 594 | 594 | ||
| 595 | 595 | ## Event: 'message' | |
| 596 | 596 | <!-- YAML | |
@@ -725,7 +725,7 @@ distribute IOCP handles without incurring a large performance hit. | |||
| 725 | 725 | ||
| 726 | 726 | `cluster.schedulingPolicy` can also be set through the | |
| 727 | 727 | `NODE_CLUSTER_SCHED_POLICY` environment variable. Valid | |
| 728 | - values are `"rr"` and `"none"`. | ||
| 728 | + values are `'rr'` and `'none'`. | ||
| 729 | 729 | ||
| 730 | 730 | ## cluster.settings | |
| 731 | 731 | <!-- 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 | |
|---|---|---|---|
@@ -244,7 +244,7 @@ Updates the cipher with `data`. If the `inputEncoding` argument is given, | |||
| 244 | 244 | its value must be one of `'utf8'`, `'ascii'`, or `'latin1'` and the `data` | |
| 245 | 245 | argument is a string using the specified encoding. If the `inputEncoding` | |
| 246 | 246 | argument is not given, `data` must be a [`Buffer`][], `TypedArray`, or | |
| 247 | - `DataView`. If `data` is a [`Buffer`][], `TypedArray`, or `DataView`, then | ||
| 247 | + `DataView`. If `data` is a [`Buffer`][], `TypedArray`, or `DataView`, then | ||
| 248 | 248 | `inputEncoding` is ignored. | |
| 249 | 249 | ||
| 250 | 250 | The `outputEncoding` specifies the output format of the enciphered | |
@@ -495,7 +495,7 @@ added: v0.5.0 | |||
| 495 | 495 | - `encoding` {string} | |
| 496 | 496 | ||
| 497 | 497 | Returns the Diffie-Hellman generator in the specified `encoding`, which can | |
| 498 | - be `'latin1'`, `'hex'`, or `'base64'`. If `encoding` is provided a string is | ||
| 498 | + be `'latin1'`, `'hex'`, or `'base64'`. If `encoding` is provided a string is | ||
| 499 | 499 | returned; otherwise a [`Buffer`][] is returned. | |
| 500 | 500 | ||
| 501 | 501 | ### diffieHellman.getPrime([encoding]) | |
| 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 | |
| Back | FazBrowse Home | New Git URL |
0 commit comments