-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
pass last result to while/until callback #963
Conversation
@@ -781,7 +781,7 @@ | |||
} else if (test.apply(this, args)) { | |||
iterator(next); | |||
} else { | |||
callback(null); | |||
callback(null, args[0]); |
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.
Is there a reason to only pass on 1 argument instead of all the arguments that were passed to the cb
?
For example waterfall
passes on all the arguments from cb
on to the next function.
incorporate @thanodnl suggestions to pass all args also tidy up the test changes
addressed @thanodnl 's suggestion, and tidied tests a bit. |
👍 |
👍 a nice enhancement. |
execution of `fn` has stopped. | ||
* `callback(err, [results])` - A callback which is called after the test fails | ||
and repeated execution of `fn` has stopped. This will be passed the results | ||
of the last call to `fn`'s callback. |
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.
A callback which is called after the test fails and repeated execution of
fn
has stopped. This will be passed the results of the last call tofn
's callback.
This doesn't read so well, maybe
A callback which is called after the test function has failed and repeated execution of
fn
has stopped. Thecallback
will be passed an error and any arguments passed to the finalfn
's callback.
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.
Thanks, should have read that out loud first :)
Update coming.
pass last result to while/until callback
Addresses #962