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

Return promises if callback not present #25

Open
IBMCode opened this issue Jan 16, 2018 · 3 comments
Open

Return promises if callback not present #25

IBMCode opened this issue Jan 16, 2018 · 3 comments

Comments

@IBMCode
Copy link

IBMCode commented Jan 16, 2018

Would be great if this library return promises if a callback is not present for apis.

@ljharb
Copy link
Collaborator

ljharb commented Jan 16, 2018

At this point, it'd be better to make a breaking change to only return a promise, rather than accepting a callback at all.

@IBMCode
Copy link
Author

IBMCode commented Jan 16, 2018

Yeah, just for backward compatibility I suppose. For the time being, I am just wrapping mine in a promise. Bluebird promisify didn't work for me, had to do it manually.

@ljharb
Copy link
Collaborator

ljharb commented Jan 16, 2018

https://npmjs.com/util.promisify is also helpful.

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

2 participants