-
The built-in node.js readline module is clunky and weird to use. It's not impossible to understand, simply attach the module to process.stdin and wait for the But that's weird, and frankly, other languages make it way easier. Looking at you, Python. It would be great for Bun to expose an async I'm teaching a group of students on how to code using TypeScript, and in lieu of setting up tsc, I'm using Bun (which has been awesome so far!). I want them to be able to input things from the terminal, but it's weird as hell to have them set up the readline module with the event listener.. that's just one more thing I need to go over with them in the short time we have together in class. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
you could try |
Beta Was this translation helpful? Give feedback.
-
@bdotsamir what have you ended up using? |
Beta Was this translation helpful? Give feedback.
I ended up using
prompt()
, since it seems to work just as fine in the console. Warning, it does block the thread. For me, this isn't an issue, but it may be for you.