-
Notifications
You must be signed in to change notification settings - Fork 147
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
add _.of and _.fromError #520
Conversation
_.fromError = function (error) { | ||
return _(function (push) { | ||
push(error); | ||
push(_.nil); |
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.
push(null, _.nil)
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.
Doh!
LGTM. |
Can you add a short entry to the |
Oh yes, of course. |
Done. |
I've just realised, have I made this function too dumb, i.e., should I check to see if what I've got is a Promise or an Iterable and not wrap those objects in |
I don't think so, for three reasons
On Tue, Aug 9, 2016 at 10:59 AM, Stefano Vozza notifications@github.com
|
Yep, makes sense. Looking at the Fantasy Land spec though it looks like https://github.com/fantasyland/fantasy-land#of-method |
As discussed in #519.