Fields

@:optionaloptionalwriter:Null<Dynamic ‑> Void>

The function to invoke to format the output of each command before writing to output.

Default: util.inspect().

@:optionaloptionaluseGlobal:Null<Bool>

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.

@:optionaloptionaluseColors:Null<Bool>

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: checking color support on the output stream if the REPL instance's terminal value is true.

@:optionaloptionalterminal:Null<Bool>

If true, specifies that the output should be treated as a TTY terminal.

Default: checking the value of the isTTY property on the output stream upon instantiation.

@:optionaloptionalreplMode:Null<Symbol>

A flag that specifies whether the default evaluator executes all JavaScript commands in strict mode or default (sloppy) mode. Acceptable values are repl.REPL_MODE_SLOPPY or repl.REPL_MODE_STRICT.

@:optionaloptionalprompt:Null<String>

The input prompt to display.

Default: '> ' (with a trailing space).

@:optionaloptionaloutput:Null<IWritable>

The Writable stream to which REPL output will be written.

Default: process.stdout.

@:optionaloptionalinput:Null<IReadable>

The Readable stream from which REPL input will be read.

Default: process.stdin.

@:optionaloptionalignoreUndefined:Null<Bool>

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

Default: false.

@:optionaloptionaleval:Null<(code:String, context:DynamicAccess<Dynamic>, file:String, cb:(error:Null<Error>, result:Dynamic) ‑> Void) ‑> Void>

The function to be used when evaluating each given line of input.

Default: an async wrapper for the JavaScript eval() function.

@:optionaloptionalcompleter:Null<ReadlineCompleterCallback>

An optional function used for custom Tab auto completion.

@:optionaloptionalbreakEvalOnSigint:Null<Bool>

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.