Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc/api
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2019-12-05 16:41:49 +0300
committerMichaël Zasso <targos@protonmail.com>2019-12-10 12:09:40 +0300
commite551c169b8e70f1b479a10272f06b4b05a158c0c (patch)
tree96e85dce71255f90bb8db21d6c52226127bc5219 /doc/api
parentdaca0780b133801322ef56d3288f38b0333f864b (diff)
repl: support previews by eager evaluating input
This adds input previews by using the inspectors eager evaluation functionality. It is implemented as additional line that is not counted towards the actual input. In case no colors are supported, it will be visible as comment. Otherwise it's grey. It will be triggered on any line change. It is heavily tested against edge cases and adheres to "dumb" terminals (previews are deactived in that case). PR-URL: https://github.com/nodejs/node/pull/30811 Fixes: https://github.com/nodejs/node/issues/20977 Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
Diffstat (limited to 'doc/api')
-rw-r--r--doc/api/repl.md5
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/api/repl.md b/doc/api/repl.md
index 967336710ce..21f5193c12c 100644
--- a/doc/api/repl.md
+++ b/doc/api/repl.md
@@ -510,6 +510,9 @@ with REPL instances programmatically.
<!-- YAML
added: v0.1.91
changes:
+ - version: REPLACEME
+ pr-url: https://github.com/nodejs/node/pull/30811
+ description: The `preview` option is now available.
- version: v12.0.0
pr-url: https://github.com/nodejs/node/pull/26518
description: The `terminal` option now follows the default description in
@@ -562,6 +565,8 @@ changes:
* `breakEvalOnSigint` {boolean} Stop evaluating the current piece of code when
`SIGINT` is received, such as when `Ctrl+C` is pressed. This cannot be used
together with a custom `eval` function. **Default:** `false`.
+ * `preview` {boolean} Defines if the repl prints output previews or not.
+ **Default:** `true`. Always `false` in case `terminal` is falsy.
* Returns: {repl.REPLServer}
The `repl.start()` method creates and starts a [`repl.REPLServer`][] instance.