summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Baunbæk <freeall@gmail.com>2016-06-15 14:44:47 +0200
committerGitHub <noreply@github.com>2016-06-15 14:44:47 +0200
commit84b16519c28e01bf3dc98cabc3c7a028608431b8 (patch)
tree1afe0f748fe8156be2a5b3bddce238d380826c58
parent7162ba51761594db8c7dccbac1ad2ef7d99900bc (diff)
downloadasync-84b16519c28e01bf3dc98cabc3c7a028608431b8.tar.gz
add callbacks to quick examples
-rw-r--r--README.md12
1 files changed, 7 insertions, 5 deletions
diff --git a/README.md b/README.md
index 1230fe7..28c108d 100644
--- a/README.md
+++ b/README.md
@@ -41,13 +41,15 @@ async.filter(['file1','file2','file3'], function(filePath, callback) {
});
async.parallel([
- function(){ ... },
- function(){ ... }
-], callback);
+ function(callback){ ... },
+ function(callback){ ... }
+], function(err, results) {
+ // optional callback
+};
async.series([
- function(){ ... },
- function(){ ... }
+ function(callback){ ... },
+ function(callback){ ... }
]);
```