@@ -18,7 +18,7 @@ To view this documentation as a manual page in a terminal, run `man node`. |
18 | 18 |
|
19 | 19 | Execute without arguments to start the [REPL][]. |
20 | 20 |
|
21 | | -_For more info about `node inspect`, please see the [debugger][] documentation._ |
| 21 | +For more info about `node inspect`, see the [debugger][] documentation. |
22 | 22 |
|
23 | 23 | ## Options |
24 | 24 | <!-- YAML |
@@ -30,22 +30,21 @@ changes: |
30 | 30 | --> |
31 | 31 |
|
32 | 32 | All options, including V8 options, allow words to be separated by both |
33 | | -dashes (`-`) or underscores (`_`). |
| 33 | +dashes (`-`) or underscores (`_`). For example, `--pending-deprecation` is |
| 34 | +equivalent to `--pending_deprecation`. |
34 | 35 |
|
35 | | -For example, `--pending-deprecation` is equivalent to `--pending_deprecation`. |
36 | | - |
37 | | -If an option that takes a single value, for example `--max-http-header-size`, |
38 | | -is passed more than once, then the last passed value will be used. Options |
39 | | -from the command line take precedence over options passed through the |
40 | | -[`NODE_OPTIONS`][] environment variable. |
| 36 | +If an option that takes a single value (such as `--max-http-header-size`) is |
| 37 | +passed more than once, then the last passed value is used. Options from the |
| 38 | +command line take precedence over options passed through the [`NODE_OPTIONS`][] |
| 39 | +environment variable. |
41 | 40 |
|
42 | 41 | ### `-` |
43 | 42 | <!-- YAML |
44 | 43 | added: v8.0.0 |
45 | 44 | --> |
46 | 45 |
|
47 | 46 | Alias for stdin. Analogous to the use of `-` in other command line utilities, |
48 | | -meaning that the script will be read from stdin, and the rest of the options |
| 47 | +meaning that the script is read from stdin, and the rest of the options |
49 | 48 | are passed to that script. |
50 | 49 |
|
51 | 50 | ### `--` |
@@ -55,7 +54,7 @@ added: v6.11.0 |
55 | 54 |
|
56 | 55 | Indicate the end of node options. Pass the rest of the arguments to the script. |
57 | 56 | If no script filename or eval/print script is supplied prior to this, then |
58 | | -the next argument will be used as a script filename. |
| 57 | +the next argument is used as a script filename. |
59 | 58 |
|
60 | 59 | ### `--abort-on-uncaught-exception` |
61 | 60 | <!-- YAML |
@@ -106,10 +105,10 @@ added: v12.0.0 |
106 | 105 | Starts the V8 CPU profiler on start up, and writes the CPU profile to disk |
107 | 106 | before exit. |
108 | 107 |
|
109 | | -If `--cpu-prof-dir` is not specified, the generated profile will be placed |
| 108 | +If `--cpu-prof-dir` is not specified, the generated profile is placed |
110 | 109 | in the current working directory. |
111 | 110 |
|
112 | | -If `--cpu-prof-name` is not specified, the generated profile will be |
| 111 | +If `--cpu-prof-name` is not specified, the generated profile is |
113 | 112 | named `CPU.${yyyymmdd}.${hhmmss}.${pid}.${tid}.${seq}.cpuprofile`. |
114 | 113 |
|
115 | 114 | ```console |
@@ -152,7 +151,7 @@ Specify the file name of the CPU profile generated by `--cpu-prof`. |
152 | 151 |
|
153 | 152 | ### `--diagnostic-dir=directory` |
154 | 153 |
|
155 | | -Set the directory to which all diagnostic output files will be written to. |
| 154 | +Set the directory to which all diagnostic output files are written. |
156 | 155 | Defaults to current working directory. |
157 | 156 |
|
158 | 157 | Affects the default output directory of: |
@@ -166,8 +165,8 @@ added: v13.12.0 |
166 | 165 | --> |
167 | 166 |
|
168 | 167 | Disable the `Object.prototype.__proto__` property. If `mode` is `delete`, the |
169 | | -property will be removed entirely. If `mode` is `throw`, accesses to the |
170 | | -property will throw an exception with the code `ERR_PROTO_ACCESS`. |
| 168 | +property is removed entirely. If `mode` is `throw`, accesses to the |
| 169 | +property throw an exception with the code `ERR_PROTO_ACCESS`. |
171 | 170 |
|
172 | 171 | ### `--disallow-code-generation-from-strings` |
173 | 172 | <!-- YAML |
@@ -254,10 +253,10 @@ Sets the resolution algorithm for resolving ES module specifiers. Valid options |
254 | 253 | are `explicit` and `node`. |
255 | 254 |
|
256 | 255 | The default is `explicit`, which requires providing the full path to a |
257 | | -module. The `node` mode will enable support for optional file extensions and |
| 256 | +module. The `node` mode enables support for optional file extensions and |
258 | 257 | the ability to import a directory that has an index file. |
259 | 258 |
|
260 | | -Please see [customizing ESM specifier resolution][] for example usage. |
| 259 | +See [customizing ESM specifier resolution][] for example usage. |
261 | 260 |
|
262 | 261 | ### `--experimental-vm-modules` |
263 | 262 | <!-- YAML |
@@ -347,10 +346,10 @@ added: v12.4.0 |
347 | 346 | Starts the V8 heap profiler on start up, and writes the heap profile to disk |
348 | 347 | before exit. |
349 | 348 |
|
350 | | -If `--heap-prof-dir` is not specified, the generated profile will be placed |
| 349 | +If `--heap-prof-dir` is not specified, the generated profile is placed |
351 | 350 | in the current working directory. |
352 | 351 |
|
353 | | -If `--heap-prof-name` is not specified, the generated profile will be |
| 352 | +If `--heap-prof-name` is not specified, the generated profile is |
354 | 353 | named `Heap.${yyyymmdd}.${hhmmss}.${pid}.${tid}.${seq}.heapprofile`. |
355 | 354 |
|
356 | 355 | ```console |
@@ -621,8 +620,8 @@ This flag exists so that the main module can be opted-in to the same behavior |
621 | 620 | that `--preserve-symlinks` gives to all other imports; they are separate flags, |
622 | 621 | however, for backward compatibility with older Node.js versions. |
623 | 622 |
|
624 | | -`--preserve-symlinks-main` does not imply `--preserve-symlinks`; it |
625 | | -is expected that `--preserve-symlinks-main` will be used in addition to |
| 623 | +`--preserve-symlinks-main` does not imply `--preserve-symlinks`; use |
| 624 | +`--preserve-symlinks-main` in addition to |
626 | 625 | `--preserve-symlinks` when it is not desirable to follow symlinks before |
627 | 626 | resolving relative paths. |
628 | 627 |
|
@@ -1192,8 +1191,7 @@ compound after anything in `options...`. Node.js will exit with an error if |
1192 | 1191 | an option that is not allowed in the environment is used, such as `-p` or a |
1193 | 1192 | script file. |
1194 | 1193 |
|
1195 | | -In case an option value happens to contain a space (for example a path listed |
1196 | | -in `--require`), it must be escaped using double quotes. For example: |
| 1194 | +If an option value contains a space, it can be escaped using double quotes: |
1197 | 1195 |
|
1198 | 1196 | ```bash |
1199 | 1197 | NODE_OPTIONS='--require "./my path/file.js"' |
@@ -1555,22 +1553,22 @@ On a machine with 2GB of memory, consider setting this to |
1555 | 1553 | $ node --max-old-space-size=1536 index.js |
1556 | 1554 | ``` |
1557 | 1555 |
|
| 1556 | +[Chrome DevTools Protocol]: https://chromedevtools.github.io/devtools-protocol/ |
| 1557 | +[REPL]: repl.html |
| 1558 | +[ScriptCoverage]: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-ScriptCoverage |
| 1559 | +[Source Map]: https://sourcemaps.info/spec.html |
| 1560 | +[Subresource Integrity]: https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity |
| 1561 | +[V8 JavaScript code coverage]: https://v8project.blogspot.com/2017/12/javascript-code-coverage.html |
1558 | 1562 | [`--openssl-config`]: #cli_openssl_config_file |
1559 | 1563 | [`Atomics.wait()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Atomics/wait |
1560 | 1564 | [`Buffer`]: buffer.html#buffer_class_buffer |
1561 | | -[`SlowBuffer`]: buffer.html#buffer_class_slowbuffer |
1562 | 1565 | [`NODE_OPTIONS`]: #cli_node_options_options |
| 1566 | +[`SlowBuffer`]: buffer.html#buffer_class_slowbuffer |
1563 | 1567 | [`process.setUncaughtExceptionCaptureCallback()`]: process.html#process_process_setuncaughtexceptioncapturecallback_fn |
1564 | 1568 | [`tls.DEFAULT_MAX_VERSION`]: tls.html#tls_tls_default_max_version |
1565 | 1569 | [`tls.DEFAULT_MIN_VERSION`]: tls.html#tls_tls_default_min_version |
1566 | 1570 | [`unhandledRejection`]: process.html#process_event_unhandledrejection |
1567 | 1571 | [`worker_threads.threadId`]: worker_threads.html#worker_threads_worker_threadid |
1568 | | -[Chrome DevTools Protocol]: https://chromedevtools.github.io/devtools-protocol/ |
1569 | | -[REPL]: repl.html |
1570 | | -[ScriptCoverage]: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-ScriptCoverage |
1571 | | -[Source Map]: https://sourcemaps.info/spec.html |
1572 | | -[Subresource Integrity]: https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity |
1573 | | -[V8 JavaScript code coverage]: https://v8project.blogspot.com/2017/12/javascript-code-coverage.html |
1574 | 1572 | [context-aware]: addons.html#addons_context_aware_addons |
1575 | 1573 | [customizing ESM specifier resolution]: esm.html#esm_customizing_esm_specifier_resolution_algorithm |
1576 | 1574 | [debugger]: debugger.html |
|