You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Not to my knowledge.
Describe the solution you'd like
I'd like to have access to a set of functions for the readline portion of Node in a similar style to import fs from 'fs/promises'. Having to wrap callback functions in promises is rather tedious.
I'd like to know if this would be something I can work on. I want this for my own purposes and have the time to work on and implement this if possible.
I agree it would make sense for Node.js to provide promise-based versions of readline.clearLine, readline.clearScreenDown, readline.cursorTo, and readline.moveCursor. readline.Interface is an AsyncIterator, which is already a promise API, but its methods (such as question) would deserve to have a Promise-based equivalent.
Activity
aduh95 commentedon Feb 9, 2021
I agree it would make sense for Node.js to provide promise-based versions of
readline.clearLine,readline.clearScreenDown,readline.cursorTo, andreadline.moveCursor.readline.Interfaceis anAsyncIterator, which is already a promise API, but its methods (such asquestion) would deserve to have a Promise-based equivalent.TheAlakazam commentedon Feb 14, 2021
I would like to work on this. Is that alright?
buffet-time commentedon Feb 14, 2021
That's fine by me, was going to get to this after doing some work on something else but if you're free go for it.
readline: refactor `Interface` to ES2015 class
readline: introduce promise-based API
readline: validate `AbortSignal`s and remove unused event listeners
readline: add `autoCommit` option