Skip to content

pass last result to while/until callback#963

Merged
megawac merged 2 commits intocaolan:masterfrom
benfleis:master
Nov 26, 2015
Merged

pass last result to while/until callback#963
megawac merged 2 commits intocaolan:masterfrom
benfleis:master

Conversation

@benfleis
Copy link
Copy Markdown

Addresses #962

Comment thread lib/async.js Outdated
Copy link
Copy Markdown

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
@benfleis
Copy link
Copy Markdown
Author

addressed @thanodnl 's suggestion, and tidied tests a bit.

@megawac
Copy link
Copy Markdown
Collaborator

megawac commented Nov 25, 2015

👍

@aearly
Copy link
Copy Markdown
Collaborator

aearly commented Nov 25, 2015

👍 a nice enhancement.

@aearly aearly added the feature label Nov 25, 2015
@benfleis
Copy link
Copy Markdown
Author

@megawac @aearly @thanodnl
Just added to the PR/branch, with an updated README to reflect the changes.

Comment thread README.md Outdated
Copy link
Copy Markdown
Collaborator

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 to fn'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. The callback will be passed an error and any arguments passed to the final fn's callback.

Copy link
Copy Markdown
Author

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.

megawac added a commit that referenced this pull request Nov 26, 2015
pass last result to while/until callback
@megawac megawac merged commit e7b334c into caolan:master Nov 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants