Skip to main content

Module repl

Module repl 

Source
Expand description

Interactive REPL (node --repl, or node on a TTY).

Keeps one persistent host across lines (module globals, var/function declarations, classes and requires survive between prompts). A line whose braces/parens/brackets are unbalanced accumulates continuation lines until the delimiters close, so multi-line functions and objects can be entered.

No startup banner is printed — the prompt appears immediately (house rule).

Functions§

run
Run the REPL loop.