-
Notifications
You must be signed in to change notification settings - Fork 7
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
To promise #17
To promise #17
Conversation
the first step to make |
cc @brentburg |
Sorry, I have been slow to get to this. I will take a look. A while back a started a big overhaul that was going to be released as |
@brentburg Anything else I can do to help the migration? Can you give a roadmap or some thoughts? I want to update |
@brentburg Can we merge this first. So, I can update chan in co-busboy, see |
this first argument. When a value is available on the channel the callback is | ||
called with the value or error. In this case the channel itself can also be a | ||
thunk. | ||
Values are removed from the channel by calling it with a Promise function chain. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd reword this to something like Values are taken off the channel by resolving the channel promise repeatedly
. You don't have to chain to get values.
ping @brentburg |
|
||
```js | ||
ch(function (err, val) { | ||
// called when there is a value or error on the channel | ||
ch.then(function (val) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem to be implemented. The channel is a function does not have a then method.
Sorry, I have gone so long without doing anything with this. There seem to be some things missing at this point (i.e. the channel function isn't thenable) and looking at the test I am still seeing a lot of thunk stuff. I have a local branch I could push up (on my old laptop, so I can't right now) that was a deeper refactor to make everything promise friendly, but I still needed to rework the tests and probably fix some bugs. If you want to push forward with your branch and fill in the gaps, that works for me, otherwise we can see what needs to be done to go forward with my branch. |
Yea! This is just the first step to Promise :)
👍 @brentburg can you push this to github? So, maybe I can give some help. |
I don't care |
@coderhaoxin see #18. It is a v1 branch and has other changes. Let me know what you think. I did a quick to-do list of what I think still needs to be done. I can try to spend some time on it too, but if you are interested in working on that branch that would be great. |
closed by #18 |
@brentburg I'll check that this weekend! |
No description provided.