ReplOptions

@native @JSType trait ReplOptions extends StObject
Companion
object
trait StObject
class Object
trait Any
class Object
trait Matchable
class Any

Value members

Inherited methods

def hasOwnProperty(v: String): Boolean
Inherited from
Object
def isPrototypeOf(v: Object): Boolean
Inherited from
Object
def propertyIsEnumerable(v: String): Boolean
Inherited from
Object
def toLocaleString(): String
Inherited from
Object
def valueOf(): Any
Inherited from
Object

Concrete fields

var breakEvalOnSigint: UndefOr[Boolean]

Stop evaluating the current piece of code when SIGINT is received, i.e. Ctrl+C is pressed. This cannot be used together with a custom eval function. Default: false.

Stop evaluating the current piece of code when SIGINT is received, i.e. Ctrl+C is pressed. This cannot be used together with a custom eval function. Default: false.

An optional function used for custom Tab auto completion.

An optional function used for custom Tab auto completion.

See also
var eval: UndefOr[REPLEval]

The function to be used when evaluating each given line of input. Default: an async wrapper for the JavaScript eval() function. An eval function can error with repl.Recoverable to indicate the input was incomplete and prompt for additional lines.

The function to be used when evaluating each given line of input. Default: an async wrapper for the JavaScript eval() function. An eval function can error with repl.Recoverable to indicate the input was incomplete and prompt for additional lines.

See also
var ignoreUndefined: UndefOr[Boolean]

If true, specifies that the default writer will not output the return value of a command if it evaluates to undefined. Default: false.

If true, specifies that the default writer will not output the return value of a command if it evaluates to undefined. Default: false.

var input: UndefOr[ReadableStream]

The Readable stream from which REPL input will be read.

The Readable stream from which REPL input will be read.

var output: UndefOr[WritableStream]

The Writable stream to which REPL output will be written.

The Writable stream to which REPL output will be written.

var preview: UndefOr[Boolean]

Defines if the repl prints output previews or not.

Defines if the repl prints output previews or not.

var prompt: UndefOr[String]

The input prompt to display.

The input prompt to display.

var replMode: UndefOr[Symbol]

A flag that specifies whether the default evaluator executes all JavaScript commands in strict mode or default (sloppy) mode. Accepted values are:

A flag that specifies whether the default evaluator executes all JavaScript commands in strict mode or default (sloppy) mode. Accepted values are:

  • repl.REPL_MODE_SLOPPY - evaluates expressions in sloppy mode.
  • repl.REPL_MODE_STRICT - evaluates expressions in strict mode. This is equivalent to prefacing every repl statement with 'use strict'.
var terminal: UndefOr[Boolean]

If true, specifies that the output should be treated as a TTY terminal, and have ANSI/VT100 escape codes written to it. Default: checking the value of the isTTY property on the output stream upon instantiation.

If true, specifies that the output should be treated as a TTY terminal, and have ANSI/VT100 escape codes written to it. Default: checking the value of the isTTY property on the output stream upon instantiation.

var useColors: UndefOr[Boolean]

If true, specifies that the default writer function should include ANSI color styling to REPL output. If a custom writer function is provided then this has no effect. Default: the REPL instance's terminal value.

If true, specifies that the default writer function should include ANSI color styling to REPL output. If a custom writer function is provided then this has no effect. Default: the REPL instance's terminal value.

var useGlobal: UndefOr[Boolean]

If true, specifies that the default evaluation function will use the JavaScript global as the context as opposed to creating a new separate context for the REPL instance. The node CLI REPL sets this value to true. Default: false.

If true, specifies that the default evaluation function will use the JavaScript global as the context as opposed to creating a new separate context for the REPL instance. The node CLI REPL sets this value to true. Default: false.

var writer: UndefOr[REPLWriter]

The function to invoke to format the output of each command before writing to output. Default: a wrapper for util.inspect.

The function to invoke to format the output of each command before writing to output. Default: a wrapper for util.inspect.

See also