[Pkg-javascript-commits] [node-async] 126/480: Updated docs about async.auto results - it does a bit more than the current docs let on.

Jonas Smedegaard js at moszumanska.debian.org
Fri May 2 08:58:19 UTC 2014


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository node-async.

commit da6d2cbea21cf0ba79248e7b1095648e5e53c4c8
Author: Jonathan Buchanan <jonathan.buchanan at gmail.com>
Date:   Fri Jan 6 20:33:16 2012 +0000

    Updated docs about async.auto results - it does a bit more than the current docs let on.
    
    Also fixed a typo in one of the examples.
---
 README.md | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/README.md b/README.md
index 94ee562..6dedec2 100644
--- a/README.md
+++ b/README.md
@@ -741,7 +741,7 @@ and each function is run as soon as its requirements are satisfied. If any of
 the functions pass an error to their callback, that function will not complete
 (so any other functions depending on it will not run) and the main callback
 will be called immediately with the error. Functions also receive an object
-containing the results of functions on which they depend.
+containing the results of functions which have completed so far.
 
 __Arguments__
 
@@ -749,8 +749,10 @@ __Arguments__
   requirements, with the function itself the last item in the array. The key
   used for each function or array is used when specifying requirements. The
   syntax is easier to understand by looking at the example.
-* callback(err) - An optional callback which is called when all the tasks have
-  been completed. The callback may receive an error as an argument.
+* callback(err, results) - An optional callback which is called when all the
+  tasks have been completed. The callback will receive an error as an argument
+  if any tasks pass an error to their callback. If all tasks complete
+  successfully, it will receive an object containing their results.
 
 __Example__
 
@@ -791,14 +793,14 @@ series functions would look like this:
                 // once there is some data and the directory exists,
                 // write the data to a file in the directory
             },
-            email_link: ['write_file', function(callback){
+            email_link: function(callback){
                 // once the file is written let's email a link to it...
             }
         ]);
     });
 
 For a complicated series of async tasks using the auto function makes adding
-new tasks much easier and makes the code more readable. 
+new tasks much easier and makes the code more readable.
 
 
 ---------------------------------------

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-async.git



More information about the Pkg-javascript-commits mailing list