node/lib/internal/repl
Mattias Runge-Broberg 60a97c0b42 readline: add getPrompt to get the current prompt
Since there is a setPrompt() there should be a getPrompt().
There are use-cases where it is needed to know what the
current prompt is. Adding a getPrompt() negates the need
to store the set prompt externally or read the internal
_prompt which would be bad practice.

Co-authored-by: Colin Ihrig <cjihrig@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/33675
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
2020-11-10 19:46:51 +00:00
..
await.js assert,repl: enable ecmaVersion 2021 in acorn parser 2020-10-30 14:52:28 +00:00
history.js lib: improve debuglog() performance 2020-05-30 17:24:43 -04:00
utils.js readline: add getPrompt to get the current prompt 2020-11-10 19:46:51 +00:00