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

[Feature] Promise-based API? #40

Open
dominique-mueller opened this issue May 24, 2018 · 2 comments
Open

[Feature] Promise-based API? #40

dominique-mueller opened this issue May 24, 2018 · 2 comments

Comments

@dominique-mueller
Copy link

Right now, cpx can be used either synchronously, or asynchronously using callbacks. With the trend in the world of NodeJS to move to native Promises - what about providing a promise-based API?

Perhaps something like copyAsync? Or replacing the copy and introducing a breaking change?

@cypherix93
Copy link

This would be a great addition, especially with async/await being the norm these days.

This probably wouldn't need a breaking change since you can just drop the last callback parameter in copy and it will treat it as if a Promise is expected.

@MickL
Copy link

MickL commented Jun 18, 2021

Would be awesome to prevent a callback-hell!
Personally I would prefer to additionally to copy that returns a promise to have copySync, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants