[Pkg-javascript-commits] [node-async] 47/480: move whilst and until into flow control section of README

Jonas Smedegaard js at moszumanska.debian.org
Fri May 2 08:58:11 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 3dd1ad903085a9cdb03c8f9e65cb1795b775ed0f
Author: Caolan McMahon <caolan at caolanmcmahon.com>
Date:   Sun Oct 17 14:40:53 2010 +0100

    move whilst and until into flow control section of README
---
 README.md | 90 ++++++++++++++++++++++++++++++++-------------------------------
 1 file changed, 46 insertions(+), 44 deletions(-)

diff --git a/README.md b/README.md
index 2f4107e..168b205 100644
--- a/README.md
+++ b/README.md
@@ -74,13 +74,13 @@ So far its been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. Usage:
 * [some](#some)
 * [every](#every)
 * [concat](#concat)
-* [whilst](#whilst)
-* [until](#until)
 
 ### Flow Control
 
 * [series](#series)
 * [parallel](#parallel)
+* [whilst](#whilst)
+* [until](#until)
 * [waterfall](#waterfall)
 * [auto](#auto)
 * [iterator](#iterator)
@@ -435,48 +435,6 @@ __Example__
 
 Same as async.concat, but executes in series instead of parallel.
 
----------------------------------------
-
-<a name="whilst" />
-### whilst(test, fn, callback)
-
-Repeatedly call fn, while test returns true. Calls the callback when stopped,
-or an error occurs.
-
-__Arguments__
-
-* test() - synchronous truth test to perform before each execution of fn.
-* fn(callback) - A function to call each time the test passes. The function is
-  passed a callback which must be called once it has completed with an optional
-  error as the first argument.
-* callback(err) - A callback which is called after the test fails and repeated
-  execution of fn has stopped.
-
-__Example__
-
-    var count = 0;
-
-    async.whilst(
-        function () { return count < 5; },
-        function (callback) {
-            count++;
-            setTimeout(callback, 1000);
-        },
-        function (err) {
-            // 5 seconds have passed
-        }
-    });
-
----------------------------------------
-
-<a name="until" />
-### until(test, fn, callback)
-
-Repeatedly call fn, until test returns true. Calls the callback when stopped,
-or an error occurs.
-
-The inverse of async.whilst.
-
 
 ## Flow Control
 
@@ -555,6 +513,50 @@ __Example__
 
 ---------------------------------------
 
+<a name="whilst" />
+### whilst(test, fn, callback)
+
+Repeatedly call fn, while test returns true. Calls the callback when stopped,
+or an error occurs.
+
+__Arguments__
+
+* test() - synchronous truth test to perform before each execution of fn.
+* fn(callback) - A function to call each time the test passes. The function is
+  passed a callback which must be called once it has completed with an optional
+  error as the first argument.
+* callback(err) - A callback which is called after the test fails and repeated
+  execution of fn has stopped.
+
+__Example__
+
+    var count = 0;
+
+    async.whilst(
+        function () { return count < 5; },
+        function (callback) {
+            count++;
+            setTimeout(callback, 1000);
+        },
+        function (err) {
+            // 5 seconds have passed
+        }
+    });
+
+
+---------------------------------------
+
+<a name="until" />
+### until(test, fn, callback)
+
+Repeatedly call fn, until test returns true. Calls the callback when stopped,
+or an error occurs.
+
+The inverse of async.whilst.
+
+
+---------------------------------------
+
 <a name="waterfall" />
 ### waterfall(tasks, [callback])
 

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