[Pkg-javascript-commits] [node-async] 389/480: Merge remote-tracking branch 'kybernetikos/patch-1'

Jonas Smedegaard js at moszumanska.debian.org
Fri May 2 08:58:45 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 f8cb033c279dc06504cefca66b17c1117b9dcf26
Merge: 1346453 eea14ed
Author: Caolan McMahon <caolan at caolanmcmahon.com>
Date:   Fri Mar 28 12:39:58 2014 +0000

    Merge remote-tracking branch 'kybernetikos/patch-1'
    
    Conflicts:
    	README.md

 README.md | 23 +++++++++++++++++++----
 1 file changed, 19 insertions(+), 4 deletions(-)

diff --cc README.md
index 0ae4f5c,02a4877..c093f7b
--- a/README.md
+++ b/README.md
@@@ -804,11 -800,26 +804,26 @@@ Like [`doWhilst`](#doWhilst), except th
  ---------------------------------------
  
  <a name="forever" />
- ### forever(fn, callback)
+ ### forever(fn, errback)
  
- Calls the asynchronous function `fn` repeatedly, in series, indefinitely.
- If an error is passed to `fn`'s callback, then `callback` is called with the
- error; otherwise it is never called.
 -Calls the asynchronous function 'fn' with a callback parameter that allows it to
++Calls the asynchronous function `fn` with a callback parameter that allows it to
+ call itself again, in series, indefinitely.
+ 
 -If an error is passed to the callback then 'errback' is called with the
++If an error is passed to the callback then `errback` is called with the
+ error, and execution stops, otherwise it will never be called.
+ 
+ ```js
+ async.forever(
+     function(next) {
+         // next is suitable for passing to things that need a callback(err [, whatever]);
+         // it will result in this function being called again.
+     },
+     function(err) {
+         // if next is called with a value in its first parameter, it will appear
+         // in here as 'err', and execution will stop.
+     }
+ );
+ ```
  
  ---------------------------------------
  

-- 
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