Packages

c

io.scalajs.nodejs.repl

REPLOptions

class REPLOptions extends Object

REPL Options

Annotations
@ScalaJSDefined() @RawJSType()
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. REPLOptions
  2. Object
  3. Any
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. 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

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. var eval: UndefOr[Function]
  9. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  10. def hasOwnProperty(v: String): Boolean
    Definition Classes
    Object
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  12. var ignoreUndefined: UndefOr[Boolean]
  13. var input: UndefOr[IReadable]
  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. def isPrototypeOf(v: Object): Boolean
    Definition Classes
    Object
  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  18. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  19. var output: UndefOr[IWritable]
  20. var prompt: UndefOr[String]
  21. def propertyIsEnumerable(v: String): Boolean
    Definition Classes
    Object
  22. var replMode: UndefOr[String]
  23. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  24. var terminal: UndefOr[Boolean]
  25. def toLocaleString(): String
    Definition Classes
    Object
  26. def toString(): String
    Definition Classes
    AnyRef → Any
  27. var useColors: UndefOr[Boolean]
  28. var useGlobal: UndefOr[Boolean]
  29. def valueOf(): Any
    Definition Classes
    Object
  30. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  31. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  32. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  33. var writer: UndefOr[Function]

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated @deprecated
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped