summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Noel <github@calendee.com>2013-10-28 13:50:12 -0500
committerJustin Noel <github@calendee.com>2013-10-28 13:50:12 -0500
commitb6408da24722c021e7529c8a8314b32991d445bd (patch)
tree27317ebca3a269fdacde69e68b27cafac5605ee4
parentf253cef6fcf8ff679b79639358b1650944603db2 (diff)
downloadasync-b6408da24722c021e7529c8a8314b32991d445bd.tar.gz
Changed the order of the asyn.each examples. The simpler version is first. The more detailed version is second.
Signed-off-by: Justin Noel <github@calendee.com>
-rw-r--r--README.md21
1 files changed, 10 insertions, 11 deletions
diff --git a/README.md b/README.md
index ae34987..3fd505e 100644
--- a/README.md
+++ b/README.md
@@ -170,6 +170,16 @@ __Arguments__
__Examples__
+
+```js
+// assuming openFiles is an array of file names and saveFile is a function
+// to save the modified contents of that file:
+
+async.each(openFiles, saveFile, function(err){
+ // if any of the saves produced an error, err would equal that error
+});
+```
+
```js
// assuming openFiles is an array of file names and saveFile is a function
// to save the modified contents of that file:
@@ -203,17 +213,6 @@ async.each(openFiles, function( file, callback) {
---------------------------------------
-```js
-// assuming openFiles is an array of file names and saveFile is a function
-// to save the modified contents of that file:
-
-async.each(openFiles, saveFile, function(err){
- // if any of the saves produced an error, err would equal that error
-});
-```
-
----------------------------------------
-
<a name="forEachSeries" />
<a name="eachSeries" />
### eachSeries(arr, iterator, callback)