• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# REPL
2
3<!--introduced_in=v0.10.0-->
4
5> Stability: 2 - Stable
6
7<!-- source_link=lib/repl.js -->
8
9The `node:repl` module provides a Read-Eval-Print-Loop (REPL) implementation
10that is available both as a standalone program or includible in other
11applications. It can be accessed using:
12
13```js
14const repl = require('node:repl');
15```
16
17## Design and features
18
19The `node:repl` module exports the [`repl.REPLServer`][] class. While running,
20instances of [`repl.REPLServer`][] will accept individual lines of user input,
21evaluate those according to a user-defined evaluation function, then output the
22result. Input and output may be from `stdin` and `stdout`, respectively, or may
23be connected to any Node.js [stream][].
24
25Instances of [`repl.REPLServer`][] support automatic completion of inputs,
26completion preview, simplistic Emacs-style line editing, multi-line inputs,
27[ZSH][]-like reverse-i-search, [ZSH][]-like substring-based history search,
28ANSI-styled output, saving and restoring current REPL session state, error
29recovery, and customizable evaluation functions. Terminals that do not support
30ANSI styles and Emacs-style line editing automatically fall back to a limited
31feature set.
32
33### Commands and special keys
34
35The following special commands are supported by all REPL instances:
36
37* `.break`: When in the process of inputting a multi-line expression, enter
38  the `.break` command (or press <kbd>Ctrl</kbd>+<kbd>C</kbd>) to abort
39  further input or processing of that expression.
40* `.clear`: Resets the REPL `context` to an empty object and clears any
41  multi-line expression being input.
42* `.exit`: Close the I/O stream, causing the REPL to exit.
43* `.help`: Show this list of special commands.
44* `.save`: Save the current REPL session to a file:
45  `> .save ./file/to/save.js`
46* `.load`: Load a file into the current REPL session.
47  `> .load ./file/to/load.js`
48* `.editor`: Enter editor mode (<kbd>Ctrl</kbd>+<kbd>D</kbd> to
49  finish, <kbd>Ctrl</kbd>+<kbd>C</kbd> to cancel).
50
51```console
52> .editor
53// Entering editor mode (^D to finish, ^C to cancel)
54function welcome(name) {
55  return `Hello ${name}!`;
56}
57
58welcome('Node.js User');
59
60// ^D
61'Hello Node.js User!'
62>
63```
64
65The following key combinations in the REPL have these special effects:
66
67* <kbd>Ctrl</kbd>+<kbd>C</kbd>: When pressed once, has the same effect as the
68  `.break` command.
69  When pressed twice on a blank line, has the same effect as the `.exit`
70  command.
71* <kbd>Ctrl</kbd>+<kbd>D</kbd>: Has the same effect as the `.exit` command.
72* <kbd>Tab</kbd>: When pressed on a blank line, displays global and local
73  (scope) variables. When pressed while entering other input, displays relevant
74  autocompletion options.
75
76For key bindings related to the reverse-i-search, see [`reverse-i-search`][].
77For all other key bindings, see [TTY keybindings][].
78
79### Default evaluation
80
81By default, all instances of [`repl.REPLServer`][] use an evaluation function
82that evaluates JavaScript expressions and provides access to Node.js built-in
83modules. This default behavior can be overridden by passing in an alternative
84evaluation function when the [`repl.REPLServer`][] instance is created.
85
86#### JavaScript expressions
87
88The default evaluator supports direct evaluation of JavaScript expressions:
89
90```console
91> 1 + 1
922
93> const m = 2
94undefined
95> m + 1
963
97```
98
99Unless otherwise scoped within blocks or functions, variables declared
100either implicitly or using the `const`, `let`, or `var` keywords
101are declared at the global scope.
102
103#### Global and local scope
104
105The default evaluator provides access to any variables that exist in the global
106scope. It is possible to expose a variable to the REPL explicitly by assigning
107it to the `context` object associated with each `REPLServer`:
108
109```js
110const repl = require('node:repl');
111const msg = 'message';
112
113repl.start('> ').context.m = msg;
114```
115
116Properties in the `context` object appear as local within the REPL:
117
118```console
119$ node repl_test.js
120> m
121'message'
122```
123
124Context properties are not read-only by default. To specify read-only globals,
125context properties must be defined using `Object.defineProperty()`:
126
127```js
128const repl = require('node:repl');
129const msg = 'message';
130
131const r = repl.start('> ');
132Object.defineProperty(r.context, 'm', {
133  configurable: false,
134  enumerable: true,
135  value: msg,
136});
137```
138
139#### Accessing core Node.js modules
140
141The default evaluator will automatically load Node.js core modules into the
142REPL environment when used. For instance, unless otherwise declared as a
143global or scoped variable, the input `fs` will be evaluated on-demand as
144`global.fs = require('node:fs')`.
145
146```console
147> fs.createReadStream('./some/file');
148```
149
150#### Global uncaught exceptions
151
152<!-- YAML
153changes:
154  - version: v12.3.0
155    pr-url: https://github.com/nodejs/node/pull/27151
156    description: The `'uncaughtException'` event is from now on triggered if the
157                 repl is used as standalone program.
158-->
159
160The REPL uses the [`domain`][] module to catch all uncaught exceptions for that
161REPL session.
162
163This use of the [`domain`][] module in the REPL has these side effects:
164
165* Uncaught exceptions only emit the [`'uncaughtException'`][] event in the
166  standalone REPL. Adding a listener for this event in a REPL within
167  another Node.js program results in [`ERR_INVALID_REPL_INPUT`][].
168
169  ```js
170  const r = repl.start();
171
172  r.write('process.on("uncaughtException", () => console.log("Foobar"));\n');
173  // Output stream includes:
174  //   TypeError [ERR_INVALID_REPL_INPUT]: Listeners for `uncaughtException`
175  //   cannot be used in the REPL
176
177  r.close();
178  ```
179
180* Trying to use [`process.setUncaughtExceptionCaptureCallback()`][] throws
181  an [`ERR_DOMAIN_CANNOT_SET_UNCAUGHT_EXCEPTION_CAPTURE`][] error.
182
183#### Assignment of the `_` (underscore) variable
184
185<!-- YAML
186changes:
187  - version: v9.8.0
188    pr-url: https://github.com/nodejs/node/pull/18919
189    description: Added `_error` support.
190-->
191
192The default evaluator will, by default, assign the result of the most recently
193evaluated expression to the special variable `_` (underscore).
194Explicitly setting `_` to a value will disable this behavior.
195
196```console
197> [ 'a', 'b', 'c' ]
198[ 'a', 'b', 'c' ]
199> _.length
2003
201> _ += 1
202Expression assignment to _ now disabled.
2034
204> 1 + 1
2052
206> _
2074
208```
209
210Similarly, `_error` will refer to the last seen error, if there was any.
211Explicitly setting `_error` to a value will disable this behavior.
212
213```console
214> throw new Error('foo');
215Uncaught Error: foo
216> _error.message
217'foo'
218```
219
220#### `await` keyword
221
222Support for the `await` keyword is enabled at the top level.
223
224```console
225> await Promise.resolve(123)
226123
227> await Promise.reject(new Error('REPL await'))
228Uncaught Error: REPL await
229    at REPL2:1:54
230> const timeout = util.promisify(setTimeout);
231undefined
232> const old = Date.now(); await timeout(1000); console.log(Date.now() - old);
2331002
234undefined
235```
236
237One known limitation of using the `await` keyword in the REPL is that
238it will invalidate the lexical scoping of the `const` and `let`
239keywords.
240
241For example:
242
243```console
244> const m = await Promise.resolve(123)
245undefined
246> m
247123
248> const m = await Promise.resolve(234)
249undefined
250> m
251234
252```
253
254[`--no-experimental-repl-await`][] shall disable top-level await in REPL.
255
256### Reverse-i-search
257
258<!-- YAML
259added:
260 - v13.6.0
261 - v12.17.0
262-->
263
264The REPL supports bi-directional reverse-i-search similar to [ZSH][]. It is
265triggered with <kbd>Ctrl</kbd>+<kbd>R</kbd> to search backward
266and <kbd>Ctrl</kbd>+<kbd>S</kbd> to search forwards.
267
268Duplicated history entries will be skipped.
269
270Entries are accepted as soon as any key is pressed that doesn't correspond
271with the reverse search. Cancelling is possible by pressing <kbd>Esc</kbd>
272or <kbd>Ctrl</kbd>+<kbd>C</kbd>.
273
274Changing the direction immediately searches for the next entry in the expected
275direction from the current position on.
276
277### Custom evaluation functions
278
279When a new [`repl.REPLServer`][] is created, a custom evaluation function may be
280provided. This can be used, for instance, to implement fully customized REPL
281applications.
282
283The following illustrates a hypothetical example of a REPL that performs
284translation of text from one language to another:
285
286```js
287const repl = require('node:repl');
288const { Translator } = require('translator');
289
290const myTranslator = new Translator('en', 'fr');
291
292function myEval(cmd, context, filename, callback) {
293  callback(null, myTranslator.translate(cmd));
294}
295
296repl.start({ prompt: '> ', eval: myEval });
297```
298
299#### Recoverable errors
300
301At the REPL prompt, pressing <kbd>Enter</kbd> sends the current line of input to
302the `eval` function. In order to support multi-line input, the `eval` function
303can return an instance of `repl.Recoverable` to the provided callback function:
304
305```js
306function myEval(cmd, context, filename, callback) {
307  let result;
308  try {
309    result = vm.runInThisContext(cmd);
310  } catch (e) {
311    if (isRecoverableError(e)) {
312      return callback(new repl.Recoverable(e));
313    }
314  }
315  callback(null, result);
316}
317
318function isRecoverableError(error) {
319  if (error.name === 'SyntaxError') {
320    return /^(Unexpected end of input|Unexpected token)/.test(error.message);
321  }
322  return false;
323}
324```
325
326### Customizing REPL output
327
328By default, [`repl.REPLServer`][] instances format output using the
329[`util.inspect()`][] method before writing the output to the provided `Writable`
330stream (`process.stdout` by default). The `showProxy` inspection option is set
331to true by default and the `colors` option is set to true depending on the
332REPL's `useColors` option.
333
334The `useColors` boolean option can be specified at construction to instruct the
335default writer to use ANSI style codes to colorize the output from the
336`util.inspect()` method.
337
338If the REPL is run as standalone program, it is also possible to change the
339REPL's [inspection defaults][`util.inspect()`] from inside the REPL by using the
340`inspect.replDefaults` property which mirrors the `defaultOptions` from
341[`util.inspect()`][].
342
343```console
344> util.inspect.replDefaults.compact = false;
345false
346> [1]
347[
348  1
349]
350>
351```
352
353To fully customize the output of a [`repl.REPLServer`][] instance pass in a new
354function for the `writer` option on construction. The following example, for
355instance, simply converts any input text to upper case:
356
357```js
358const repl = require('node:repl');
359
360const r = repl.start({ prompt: '> ', eval: myEval, writer: myWriter });
361
362function myEval(cmd, context, filename, callback) {
363  callback(null, cmd);
364}
365
366function myWriter(output) {
367  return output.toUpperCase();
368}
369```
370
371## Class: `REPLServer`
372
373<!-- YAML
374added: v0.1.91
375-->
376
377* `options` {Object|string} See [`repl.start()`][]
378* Extends: {readline.Interface}
379
380Instances of `repl.REPLServer` are created using the [`repl.start()`][] method
381or directly using the JavaScript `new` keyword.
382
383```js
384const repl = require('node:repl');
385
386const options = { useColors: true };
387
388const firstInstance = repl.start(options);
389const secondInstance = new repl.REPLServer(options);
390```
391
392### Event: `'exit'`
393
394<!-- YAML
395added: v0.7.7
396-->
397
398The `'exit'` event is emitted when the REPL is exited either by receiving the
399`.exit` command as input, the user pressing <kbd>Ctrl</kbd>+<kbd>C</kbd> twice
400to signal `SIGINT`,
401or by pressing <kbd>Ctrl</kbd>+<kbd>D</kbd> to signal `'end'` on the input
402stream. The listener
403callback is invoked without any arguments.
404
405```js
406replServer.on('exit', () => {
407  console.log('Received "exit" event from repl!');
408  process.exit();
409});
410```
411
412### Event: `'reset'`
413
414<!-- YAML
415added: v0.11.0
416-->
417
418The `'reset'` event is emitted when the REPL's context is reset. This occurs
419whenever the `.clear` command is received as input _unless_ the REPL is using
420the default evaluator and the `repl.REPLServer` instance was created with the
421`useGlobal` option set to `true`. The listener callback will be called with a
422reference to the `context` object as the only argument.
423
424This can be used primarily to re-initialize REPL context to some pre-defined
425state:
426
427```js
428const repl = require('node:repl');
429
430function initializeContext(context) {
431  context.m = 'test';
432}
433
434const r = repl.start({ prompt: '> ' });
435initializeContext(r.context);
436
437r.on('reset', initializeContext);
438```
439
440When this code is executed, the global `'m'` variable can be modified but then
441reset to its initial value using the `.clear` command:
442
443```console
444$ ./node example.js
445> m
446'test'
447> m = 1
4481
449> m
4501
451> .clear
452Clearing context...
453> m
454'test'
455>
456```
457
458### `replServer.defineCommand(keyword, cmd)`
459
460<!-- YAML
461added: v0.3.0
462-->
463
464* `keyword` {string} The command keyword (_without_ a leading `.` character).
465* `cmd` {Object|Function} The function to invoke when the command is processed.
466
467The `replServer.defineCommand()` method is used to add new `.`-prefixed commands
468to the REPL instance. Such commands are invoked by typing a `.` followed by the
469`keyword`. The `cmd` is either a `Function` or an `Object` with the following
470properties:
471
472* `help` {string} Help text to be displayed when `.help` is entered (Optional).
473* `action` {Function} The function to execute, optionally accepting a single
474  string argument.
475
476The following example shows two new commands added to the REPL instance:
477
478```js
479const repl = require('node:repl');
480
481const replServer = repl.start({ prompt: '> ' });
482replServer.defineCommand('sayhello', {
483  help: 'Say hello',
484  action(name) {
485    this.clearBufferedCommand();
486    console.log(`Hello, ${name}!`);
487    this.displayPrompt();
488  },
489});
490replServer.defineCommand('saybye', function saybye() {
491  console.log('Goodbye!');
492  this.close();
493});
494```
495
496The new commands can then be used from within the REPL instance:
497
498```console
499> .sayhello Node.js User
500Hello, Node.js User!
501> .saybye
502Goodbye!
503```
504
505### `replServer.displayPrompt([preserveCursor])`
506
507<!-- YAML
508added: v0.1.91
509-->
510
511* `preserveCursor` {boolean}
512
513The `replServer.displayPrompt()` method readies the REPL instance for input
514from the user, printing the configured `prompt` to a new line in the `output`
515and resuming the `input` to accept new input.
516
517When multi-line input is being entered, an ellipsis is printed rather than the
518'prompt'.
519
520When `preserveCursor` is `true`, the cursor placement will not be reset to `0`.
521
522The `replServer.displayPrompt` method is primarily intended to be called from
523within the action function for commands registered using the
524`replServer.defineCommand()` method.
525
526### `replServer.clearBufferedCommand()`
527
528<!-- YAML
529added: v9.0.0
530-->
531
532The `replServer.clearBufferedCommand()` method clears any command that has been
533buffered but not yet executed. This method is primarily intended to be
534called from within the action function for commands registered using the
535`replServer.defineCommand()` method.
536
537### `replServer.parseREPLKeyword(keyword[, rest])`
538
539<!-- YAML
540added: v0.8.9
541deprecated: v9.0.0
542-->
543
544> Stability: 0 - Deprecated.
545
546* `keyword` {string} the potential keyword to parse and execute
547* `rest` {any} any parameters to the keyword command
548* Returns: {boolean}
549
550An internal method used to parse and execute `REPLServer` keywords.
551Returns `true` if `keyword` is a valid keyword, otherwise `false`.
552
553### `replServer.setupHistory(historyPath, callback)`
554
555<!-- YAML
556added: v11.10.0
557-->
558
559* `historyPath` {string} the path to the history file
560* `callback` {Function} called when history writes are ready or upon error
561  * `err` {Error}
562  * `repl` {repl.REPLServer}
563
564Initializes a history log file for the REPL instance. When executing the
565Node.js binary and using the command-line REPL, a history file is initialized
566by default. However, this is not the case when creating a REPL
567programmatically. Use this method to initialize a history log file when working
568with REPL instances programmatically.
569
570## `repl.builtinModules`
571
572<!-- YAML
573added: v14.5.0
574-->
575
576* {string\[]}
577
578A list of the names of all Node.js modules, e.g., `'http'`.
579
580## `repl.start([options])`
581
582<!-- YAML
583added: v0.1.91
584changes:
585  - version:
586     - v13.4.0
587     - v12.17.0
588    pr-url: https://github.com/nodejs/node/pull/30811
589    description: The `preview` option is now available.
590  - version: v12.0.0
591    pr-url: https://github.com/nodejs/node/pull/26518
592    description: The `terminal` option now follows the default description in
593                 all cases and `useColors` checks `hasColors()` if available.
594  - version: v10.0.0
595    pr-url: https://github.com/nodejs/node/pull/19187
596    description: The `REPL_MAGIC_MODE` `replMode` was removed.
597  - version: v6.3.0
598    pr-url: https://github.com/nodejs/node/pull/6635
599    description: The `breakEvalOnSigint` option is supported now.
600  - version: v5.8.0
601    pr-url: https://github.com/nodejs/node/pull/5388
602    description: The `options` parameter is optional now.
603-->
604
605* `options` {Object|string}
606  * `prompt` {string} The input prompt to display. **Default:** `'> '`
607    (with a trailing space).
608  * `input` {stream.Readable} The `Readable` stream from which REPL input will
609    be read. **Default:** `process.stdin`.
610  * `output` {stream.Writable} The `Writable` stream to which REPL output will
611    be written. **Default:** `process.stdout`.
612  * `terminal` {boolean} If `true`, specifies that the `output` should be
613    treated as a TTY terminal.
614    **Default:** checking the value of the `isTTY` property on the `output`
615    stream upon instantiation.
616  * `eval` {Function} The function to be used when evaluating each given line
617    of input. **Default:** an async wrapper for the JavaScript `eval()`
618    function. An `eval` function can error with `repl.Recoverable` to indicate
619    the input was incomplete and prompt for additional lines.
620  * `useColors` {boolean} If `true`, specifies that the default `writer`
621    function should include ANSI color styling to REPL output. If a custom
622    `writer` function is provided then this has no effect. **Default:** checking
623    color support on the `output` stream if the REPL instance's `terminal` value
624    is `true`.
625  * `useGlobal` {boolean} If `true`, specifies that the default evaluation
626    function will use the JavaScript `global` as the context as opposed to
627    creating a new separate context for the REPL instance. The node CLI REPL
628    sets this value to `true`. **Default:** `false`.
629  * `ignoreUndefined` {boolean} If `true`, specifies that the default writer
630    will not output the return value of a command if it evaluates to
631    `undefined`. **Default:** `false`.
632  * `writer` {Function} The function to invoke to format the output of each
633    command before writing to `output`. **Default:** [`util.inspect()`][].
634  * `completer` {Function} An optional function used for custom Tab auto
635    completion. See [`readline.InterfaceCompleter`][] for an example.
636  * `replMode` {symbol} A flag that specifies whether the default evaluator
637    executes all JavaScript commands in strict mode or default (sloppy) mode.
638    Acceptable values are:
639    * `repl.REPL_MODE_SLOPPY` to evaluate expressions in sloppy mode.
640    * `repl.REPL_MODE_STRICT` to evaluate expressions in strict mode. This is
641      equivalent to prefacing every repl statement with `'use strict'`.
642  * `breakEvalOnSigint` {boolean} Stop evaluating the current piece of code when
643    `SIGINT` is received, such as when <kbd>Ctrl</kbd>+<kbd>C</kbd> is pressed.
644    This cannot be used
645    together with a custom `eval` function. **Default:** `false`.
646  * `preview` {boolean} Defines if the repl prints autocomplete and output
647    previews or not. **Default:** `true` with the default eval function and
648    `false` in case a custom eval function is used. If `terminal` is falsy, then
649    there are no previews and the value of `preview` has no effect.
650* Returns: {repl.REPLServer}
651
652The `repl.start()` method creates and starts a [`repl.REPLServer`][] instance.
653
654If `options` is a string, then it specifies the input prompt:
655
656```js
657const repl = require('node:repl');
658
659// a Unix style prompt
660repl.start('$ ');
661```
662
663## The Node.js REPL
664
665Node.js itself uses the `node:repl` module to provide its own interactive
666interface for executing JavaScript. This can be used by executing the Node.js
667binary without passing any arguments (or by passing the `-i` argument):
668
669```console
670$ node
671> const a = [1, 2, 3];
672undefined
673> a
674[ 1, 2, 3 ]
675> a.forEach((v) => {
676...   console.log(v);
677...   });
6781
6792
6803
681```
682
683### Environment variable options
684
685Various behaviors of the Node.js REPL can be customized using the following
686environment variables:
687
688* `NODE_REPL_HISTORY`: When a valid path is given, persistent REPL history
689  will be saved to the specified file rather than `.node_repl_history` in the
690  user's home directory. Setting this value to `''` (an empty string) will
691  disable persistent REPL history. Whitespace will be trimmed from the value.
692  On Windows platforms environment variables with empty values are invalid so
693  set this variable to one or more spaces to disable persistent REPL history.
694* `NODE_REPL_HISTORY_SIZE`: Controls how many lines of history will be
695  persisted if history is available. Must be a positive number.
696  **Default:** `1000`.
697* `NODE_REPL_MODE`: May be either `'sloppy'` or `'strict'`. **Default:**
698  `'sloppy'`, which will allow non-strict mode code to be run.
699
700### Persistent history
701
702By default, the Node.js REPL will persist history between `node` REPL sessions
703by saving inputs to a `.node_repl_history` file located in the user's home
704directory. This can be disabled by setting the environment variable
705`NODE_REPL_HISTORY=''`.
706
707### Using the Node.js REPL with advanced line-editors
708
709For advanced line-editors, start Node.js with the environment variable
710`NODE_NO_READLINE=1`. This will start the main and debugger REPL in canonical
711terminal settings, which will allow use with `rlwrap`.
712
713For example, the following can be added to a `.bashrc` file:
714
715```text
716alias node="env NODE_NO_READLINE=1 rlwrap node"
717```
718
719### Starting multiple REPL instances against a single running instance
720
721It is possible to create and run multiple REPL instances against a single
722running instance of Node.js that share a single `global` object but have
723separate I/O interfaces.
724
725The following example, for instance, provides separate REPLs on `stdin`, a Unix
726socket, and a TCP socket:
727
728```js
729const net = require('node:net');
730const repl = require('node:repl');
731let connections = 0;
732
733repl.start({
734  prompt: 'Node.js via stdin> ',
735  input: process.stdin,
736  output: process.stdout,
737});
738
739net.createServer((socket) => {
740  connections += 1;
741  repl.start({
742    prompt: 'Node.js via Unix socket> ',
743    input: socket,
744    output: socket,
745  }).on('exit', () => {
746    socket.end();
747  });
748}).listen('/tmp/node-repl-sock');
749
750net.createServer((socket) => {
751  connections += 1;
752  repl.start({
753    prompt: 'Node.js via TCP socket> ',
754    input: socket,
755    output: socket,
756  }).on('exit', () => {
757    socket.end();
758  });
759}).listen(5001);
760```
761
762Running this application from the command line will start a REPL on stdin.
763Other REPL clients may connect through the Unix socket or TCP socket. `telnet`,
764for instance, is useful for connecting to TCP sockets, while `socat` can be used
765to connect to both Unix and TCP sockets.
766
767By starting a REPL from a Unix socket-based server instead of stdin, it is
768possible to connect to a long-running Node.js process without restarting it.
769
770For an example of running a "full-featured" (`terminal`) REPL over
771a `net.Server` and `net.Socket` instance, see:
772<https://gist.github.com/TooTallNate/2209310>.
773
774For an example of running a REPL instance over [`curl(1)`][], see:
775<https://gist.github.com/TooTallNate/2053342>.
776
777[TTY keybindings]: readline.md#tty-keybindings
778[ZSH]: https://en.wikipedia.org/wiki/Z_shell
779[`'uncaughtException'`]: process.md#event-uncaughtexception
780[`--no-experimental-repl-await`]: cli.md#--no-experimental-repl-await
781[`ERR_DOMAIN_CANNOT_SET_UNCAUGHT_EXCEPTION_CAPTURE`]: errors.md#err_domain_cannot_set_uncaught_exception_capture
782[`ERR_INVALID_REPL_INPUT`]: errors.md#err_invalid_repl_input
783[`curl(1)`]: https://curl.haxx.se/docs/manpage.html
784[`domain`]: domain.md
785[`process.setUncaughtExceptionCaptureCallback()`]: process.md#processsetuncaughtexceptioncapturecallbackfn
786[`readline.InterfaceCompleter`]: readline.md#use-of-the-completer-function
787[`repl.ReplServer`]: #class-replserver
788[`repl.start()`]: #replstartoptions
789[`reverse-i-search`]: #reverse-i-search
790[`util.inspect()`]: util.md#utilinspectobject-options
791[stream]: stream.md
792