-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
Promise interface #14
Comments
I'm too dependent on the interface in upstream deps to make a breaking change like removing the cbs so i'd very much prefer to keep that. You can easily util.promisify this api as it is now right? |
I'm fine if you wanna go the non-breaking route and support both. |
What about adding promises.js that exports the functions with util.promisify? then it's less bloated and to use promises you just do |
We can actually have both callbacks and promises when we test whether the last argument is a function. Or would this too brittle for your tastes? |
If you only use the .query function, this one is a simple solution:
|
Been working with a lot of async/await lately and a callback API is really hindering there. I think we can return promises if the callback argument is not a function. Or should we go the route of completely removing the callback interface and do a major version bump?
The text was updated successfully, but these errors were encountered: