@@ -14,13 +14,13 @@ const repl = require('repl');
1414
1515## Design and Features
1616
17- The ` repl ` module exports the ` repl.REPLServer ` class. While running, instances
18- of ` repl.REPLServer ` will accept individual lines of user input, evaluate those
19- according to a user-defined evaluation function, then output the result. Input
20- and output may be from ` stdin ` and ` stdout ` , respectively, or may be connected
21- to any Node.js [ stream] [ ] .
17+ The ` repl ` module exports the [ ` repl.REPLServer ` ] [ ] class. While running,
18+ instances of [ ` repl.REPLServer ` ] [ ] will accept individual lines of user input,
19+ evaluate those according to a user-defined evaluation function, then output the
20+ result. Input and output may be from ` stdin ` and ` stdout ` , respectively, or may
21+ be connected to any Node.js [ stream] [ ] .
2222
23- Instances of ` repl.REPLServer ` support automatic completion of inputs,
23+ Instances of [ ` repl.REPLServer ` ] [ ] support automatic completion of inputs,
2424simplistic Emacs-style line editing, multi-line inputs, ANSI-styled output,
2525saving and restoring current REPL session state, error recovery, and
2626customizable evaluation functions.
@@ -69,10 +69,10 @@ The following key combinations in the REPL have these special effects:
6969
7070### Default Evaluation
7171
72- By default, all instances of ` repl.REPLServer ` use an evaluation function that
73- evaluates JavaScript expressions and provides access to Node.js' built-in
72+ By default, all instances of [ ` repl.REPLServer ` ] [ ] use an evaluation function
73+ that evaluates JavaScript expressions and provides access to Node.js' built-in
7474modules. This default behavior can be overridden by passing in an alternative
75- evaluation function when the ` repl.REPLServer ` instance is created.
75+ evaluation function when the [ ` repl.REPLServer ` ] [ ] instance is created.
7676
7777#### JavaScript Expressions
7878
@@ -211,7 +211,7 @@ undefined
211211
212212### Custom Evaluation Functions
213213
214- When a new ` repl.REPLServer ` is created, a custom evaluation function may be
214+ When a new [ ` repl.REPLServer ` ] [ ] is created, a custom evaluation function may be
215215provided. This can be used, for instance, to implement fully customized REPL
216216applications.
217217
@@ -261,13 +261,13 @@ function isRecoverableError(error) {
261261
262262### Customizing REPL Output
263263
264- By default, ` repl.REPLServer ` instances format output using the
264+ By default, [ ` repl.REPLServer ` ] [ ] instances format output using the
265265[ ` util.inspect() ` ] [ ] method before writing the output to the provided ` Writable `
266266stream (` process.stdout ` by default). The ` useColors ` boolean option can be
267267specified at construction to instruct the default writer to use ANSI style
268268codes to colorize the output from the ` util.inspect() ` method.
269269
270- It is possible to fully customize the output of a ` repl.REPLServer ` instance
270+ It is possible to fully customize the output of a [ ` repl.REPLServer ` ] [ ] instance
271271by passing a new function in using the ` writer ` option on construction. The
272272following example, for instance, simply converts any input text to upper case:
273273
@@ -500,7 +500,7 @@ changes:
500500 ` SIGINT ` is received, i.e. ` Ctrl+C ` is pressed. This cannot be used together
501501 with a custom ` eval ` function. ** Default:** ` false ` .
502502
503- The ` repl.start() ` method creates and starts a ` repl.REPLServer ` instance.
503+ The ` repl.start() ` method creates and starts a [ ` repl.REPLServer ` ] [ ] instance.
504504
505505If ` options ` is a string, then it specifies the input prompt:
506506
@@ -631,6 +631,7 @@ For an example of running a REPL instance over [curl(1)][], see:
631631[ `process.setUncaughtExceptionCaptureCallback()` ] : process.html#process_process_setuncaughtexceptioncapturecallback_fn
632632[ `readline.InterfaceCompleter` ] : readline.html#readline_use_of_the_completer_function
633633[ `readline.Interface` ] : readline.html#readline_class_interface
634+ [ `repl.ReplServer` ] : #repl_class_replserver
634635[ `util.inspect()` ] : util.html#util_util_inspect_object_options
635636[ curl(1) ] : https://curl.haxx.se/docs/manpage.html
636637[ stream ] : stream.html
0 commit comments