summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolan McMahon <caolan@caolanmcmahon.com>2012-02-12 18:24:15 -0800
committerCaolan McMahon <caolan@caolanmcmahon.com>2012-02-12 18:24:15 -0800
commitee3f97447b73d22e3e7e4ded5c976f2f6795d26c (patch)
treeeef40cf5e21b25a5382f186468bdb07b068f4491
parent0225f709ed4f4cce4861b193e80ae2320adf3d04 (diff)
parent751cd30602545db170b6f508a222b03e53598548 (diff)
downloadasync-ee3f97447b73d22e3e7e4ded5c976f2f6795d26c.tar.gz
Merge pull request #79 from clutchski/patch-1
Updated waterfall docs to show final result is passed
-rw-r--r--README.md10
1 files changed, 7 insertions, 3 deletions
diff --git a/README.md b/README.md
index dbefb34..f28b514 100644
--- a/README.md
+++ b/README.md
@@ -654,8 +654,10 @@ __Arguments__
* tasks - An array of functions to run, each function is passed a callback it
must call on completion.
-* callback(err) - An optional callback to run once all the functions have
- completed. This function gets passed any error that may have occurred.
+* callback(err, [results]) - An optional callback to run once all the functions
+ have completed. This will be passed the results of the last task's callback.
+
+
__Example__
@@ -670,7 +672,9 @@ __Example__
// arg1 now equals 'three'
callback(null, 'done');
}
- ]);
+ ], function (err, result) {
+ // result now equals 'done'
+ });
---------------------------------------