V
V
victorpzdnf2020-05-07 16:06:39
JavaScript
victorpzdnf, 2020-05-07 16:06:39

Node.js - console input?

Means: I have a certain JS console. I need to receive input in this way: I pressed one button, it was transferred, depending on it, the necessary scripts were launched, and everything returned to the beginning. Ie not so that he entered the text (or letter), pressed Enter and then everything worked, but immediately after pressing the first key. As in Bat'nikah, where they ask you:
Go away? (Y/N)
Press Y and the script continues. If you need libraries - OK, I'll install it.
PS Sorry for such a long text, I tried to reflect the essence of the issue as much as possible.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey, 2020-05-07
@Azperin

https://nodejs.org/api/readline.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question