Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Promises version of ReadLine #37287

Closed
buffet-time opened this issue Feb 9, 2021 · 3 comments
Closed

Add Promises version of ReadLine #37287

buffet-time opened this issue Feb 9, 2021 · 3 comments
Labels
feature request Issues that request new features to be added to Node.js. readline Issues and PRs related to the built-in readline module.

Comments

@buffet-time
Copy link

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.

@aduh95
Copy link
Contributor

aduh95 commented Feb 9, 2021

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.

@TheAlakazam
Copy link

I would like to work on this. Is that alright?

@buffet-time
Copy link
Author

I would like to work on this. Is that alright?

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.

aduh95 added a commit to aduh95/node that referenced this issue Mar 27, 2021
@Ayase-252 Ayase-252 added feature request Issues that request new features to be added to Node.js. readline Issues and PRs related to the built-in readline module. labels Apr 13, 2021
aduh95 added a commit to aduh95/node that referenced this issue Apr 24, 2021
aduh95 added a commit to aduh95/node that referenced this issue Sep 16, 2021
PR-URL: nodejs#37947
Fixes: nodejs#37287
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
aduh95 added a commit to aduh95/node that referenced this issue Sep 16, 2021
PR-URL: nodejs#37947
Fixes: nodejs#37287
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
aduh95 added a commit to aduh95/node that referenced this issue Sep 16, 2021
PR-URL: nodejs#37947
Fixes: nodejs#37287
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
@aduh95 aduh95 closed this as completed in 592d1c3 Sep 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Issues that request new features to be added to Node.js. readline Issues and PRs related to the built-in readline module.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants