update to allow passing args to tap#19
Open
patrick-rodgers wants to merge 3 commits intogeejs:masterfrom
Open
Conversation
Collaborator
|
@patrick-rodgers Thank you very much for your contribution. Will you please add two tests for this? Bonus if you have a use-case you can link to so we can put it in the wiki and write about the motivation for this feature in the next release. Thanks |
Author
|
Added the tests to cover calling tap with 0, 1, or 2 args. As for a usecase you can have a look at where I used it in a task to build docs. I needed to grab the header and footer for each article and wanted to only get them once to pass them on to the function to create the html article. |
Author
|
Oh, and all the tests pass, but please do have a look as CoffeeScript is new to me so always possible I am not actually calling anything :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This update allows the passing of an argument variable through to the lambda method. The argument can be a single value, array, or object - it is naively passed to the lambda. This addresses issue #17.
Updated to also allow this: