asyncify promisified functions#840
Conversation
There was a problem hiding this comment.
There can be only one value from promise so can you do
callback.call(this, value)|
👍 can you add some unit tests (feel free to add a dev dependency for some promise implementation, e.g. NPO/rsvp/bluebird/es6-promise) |
There was a problem hiding this comment.
We don't want to have the callback call in the try/catch block.
There was a problem hiding this comment.
Yep: The failing test is the one that guards against this: https://travis-ci.org/caolan/async/jobs/70115957
unit tests for es6-promise and rsvp
Conflicts: package.json
|
Done! |
There was a problem hiding this comment.
You might want to make these tests node-only, because this won't work in the browser.
|
I think node-only for a while, but all tested promise libraries differently support browsers. |
|
It's not the promise implementation, but the |
Most of Promise realisations doesn't contain
nodeifymethod. Here is extention of async wrapper for promisified functions.For example promise-styled openpgp library functions looks like
And can be easily wrapped to use with favourite async:)