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>
parent
3c38445c
Please register or sign in to comment