caolan/async — pull request #272 by michaelficarra (2013-03-20 22:22:36+00:00)
Title: add async.cond, aliased as async.if

I just tried out this project and was amazed to find out that there was no conditional evaluation equivalent under the "control flow" section. I did my best to search through the issues, but didn't see any requests for it. So here's my version.

Its usage is pretty straightforward. You provide a `test`, which chooses which callback to call, along with a `consequent` and an `alternate`, which produce possibly-different values for the final argument, the `continuation`. Errors are passed along as the first argument, as seems to be the idiom. I used dynamic member access to set the `if` member since I wasn't sure if you support ES3 environments.