You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
REPL: Fix for multiline input when using custom eval function
Multiline input doesn't work if user overrides "eval" in
REPL.start. Overriding default eval will stop multiline
inputs on syntax errors because of the current error checking
in the finish callback.
This fixes that issue and allows for a custom recoverableError
check function to be passed the the REPL server for more
customisable use.
fixesnodejs#8640
Copy file name to clipboardexpand all lines: doc/api/repl.markdown
+2
Original file line number
Diff line number
Diff line change
@@ -49,6 +49,8 @@ the following values:
49
49
50
50
-`eval` - function that will be used to eval each given line. Defaults to
51
51
an async wrapper for `eval()`. See below for an example of a custom `eval`.
52
+
53
+
-`recoverable` - function that will return a `bool` when passed an error and report if it is recoverable. Use if your `eval` returns none standard errors but you still want the benefits of multiline input.
52
54
53
55
-`useColors` - a boolean which specifies whether or not the `writer` function
54
56
should output colors. If a different `writer` function is set then this does
0 commit comments