class REPLOptions extends Object
REPL Options
- Annotations
- @ScalaJSDefined() @RawJSType()
- Alphabetic
- By Inheritance
- REPLOptions
- Object
- Any
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
REPLOptions(prompt: UndefOr[String] = js.undefined, input: UndefOr[IReadable] = js.undefined, output: UndefOr[IWritable] = js.undefined, terminal: UndefOr[Boolean] = js.undefined, eval: UndefOr[Function] = js.undefined, useColors: UndefOr[Boolean] = js.undefined, useGlobal: UndefOr[Boolean] = js.undefined, ignoreUndefined: UndefOr[Boolean] = js.undefined, writer: UndefOr[Function] = js.undefined, replMode: UndefOr[String] = js.undefined)
- prompt
the prompt and stream for all I/O. Defaults to > .
- input
the readable stream to listen to. Defaults to process.stdin.
- output
the writable stream to write readline data to. Defaults to process.stdout.
- terminal
pass true if the stream should be treated like a TTY, and have ANSI/VT100 escape codes written to it. Defaults to checking isTTY on the output stream upon instantiation.
- eval
function that will be used to eval each given line. Defaults to an async wrapper for eval(). See below for an example of a custom eval.
- useColors
a boolean which specifies whether or not the writer function should output colors. If a different writer function is set then this does nothing. Defaults to the repl's terminal value.
- useGlobal
if set to true, then the repl will use the global object, instead of running scripts in a separate context. Defaults to false.
- ignoreUndefined
if set to true, then the repl will not output the return value of command if it's undefined. Defaults to false.
- writer
the function to invoke for each command that gets evaluated which returns the formatting (including coloring) to display. Defaults to util.inspect.
- replMode
controls whether the repl runs all commands in strict mode, default mode, or a hybrid mode ("magic" mode.) Acceptable values are:
- repl.REPL_MODE_SLOPPY - run commands in sloppy mode.
- repl.REPL_MODE_STRICT - run commands in strict mode. This is equivalent to prefacing every repl statement with 'use strict'.
- repl.REPL_MODE_MAGIC - attempt to run commands in default mode. If they fail to parse, re-try in strict mode.
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- var eval: UndefOr[Function]
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hasOwnProperty(v: String): Boolean
- Definition Classes
- Object
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- var ignoreUndefined: UndefOr[Boolean]
- var input: UndefOr[IReadable]
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isPrototypeOf(v: Object): Boolean
- Definition Classes
- Object
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- var output: UndefOr[IWritable]
- var prompt: UndefOr[String]
-
def
propertyIsEnumerable(v: String): Boolean
- Definition Classes
- Object
- var replMode: UndefOr[String]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- var terminal: UndefOr[Boolean]
-
def
toLocaleString(): String
- Definition Classes
- Object
-
def
toString(): String
- Definition Classes
- AnyRef → Any
- var useColors: UndefOr[Boolean]
- var useGlobal: UndefOr[Boolean]
-
def
valueOf(): Any
- Definition Classes
- Object
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- var writer: UndefOr[Function]