|
|
@ -27,7 +27,7 @@ For example, you could add this to your bashrc file: |
|
|
|
alias node="env NODE_NO_READLINE=1 rlwrap node" |
|
|
|
|
|
|
|
|
|
|
|
### repl.start(prompt='> ', stream=process.stdin, eval=eval, useGlobal=false) |
|
|
|
### repl.start(prompt='> ', stream=process.stdin, eval=eval, useGlobal=false, ignoreUndefined=false) |
|
|
|
|
|
|
|
Starts a REPL with `prompt` as the prompt and `stream` for all I/O. `prompt` |
|
|
|
is optional and defaults to `> `. `stream` is optional and defaults to |
|
|
@ -36,6 +36,9 @@ is optional and defaults to `> `. `stream` is optional and defaults to |
|
|
|
If `useGlobal` is set to true, then the repl will use the global object, |
|
|
|
instead of running scripts in a separate context. |
|
|
|
|
|
|
|
If `ignoreUndefined` is set to true, then the repl will not output return value |
|
|
|
of command if it's `undefined`. |
|
|
|
|
|
|
|
You can use your own `eval` function if it has following signature: |
|
|
|
|
|
|
|
function eval(cmd, callback) { |
|
|
|