-
Notifications
You must be signed in to change notification settings - Fork 171
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 wrapper #176
Comments
I like that idea. |
The idea is good, but the specific implementation expects the callback to always have a single parameter which is determined to be either the result or an error depending on whether it is an Error instance or not. Most callback handlers have the form of |
I'm open to it if we keep it as simple. |
i'll get this in the next release, i think i know how i want to do it though. the main question i have is do we anticipate people only wrapping things in promises that accept two parameters to the callback? what about things like |
I've just now seen this discussion ... ignore pr #187 until we settle on this |
propsed something that could work for multiple params, you can take a look at #188 it's quite general, maybe we should by default expect a callback to look like this |
hi guys, could I help more to get this to the finish line? |
closing this, IMO the use cases here are too varied to get it right with one method |
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions. |
What do you think about moving the promise wrapper (https://github.com/hapijs/hapi/blob/master/lib/promises.js) from hapi to hoek? Other modules could then easily reuse this code. For example: hapijs/glue#54.
The text was updated successfully, but these errors were encountered: