Skip to content
This repository has been archived by the owner on Sep 6, 2024. It is now read-only.

Feature: Add support for promises #89

Closed
wants to merge 1 commit into from

Conversation

lsquires
Copy link

Added support for promises and async/await to callback functions. Added examples and explanation to readme.
The api callback functions now have a promise based variant with the same function name appended by "Async".

…ed examples and explanation to readme.

All api callback functions now have a promise based variant with the same function name appended by "Async".
@thisredone
Copy link
Contributor

This is basically what you can accomplish already with the bluebird's promisifyAll function. A proper promise/async support should work by always returning a promise and letting the user omit the callback.

@jkoudys
Copy link

jkoudys commented Apr 7, 2018

I'll echo @thisredone 's comment, and also point out that node8 even includes promisify as part of the builtin utils now. We should be making proper async code, not merely wrapping error-first callbacks.

What concerns me is that this PR is sitting open, when it should have been rejected and closed months ago.

@chrisdukakis
Copy link
Contributor

Thank you for the PR! It turned out that a rewrite was required to properly integrate promises. Promise support will be introduced in v.1.0.0 and is currently implemented on next branch.

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

Successfully merging this pull request may close these issues.

4 participants