diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -1,3 +1,5 @@ +**NOTE: This is the README for Async 2.0, currently under development. For docs for async@1.5.2 go [HERE](https://github.com/caolan/async/blob/v1.5.2/README.md). + # Async.js [![Build Status via Travis CI](https://travis-ci.org/caolan/async.svg?branch=master)](https://travis-ci.org/caolan/async) @@ -1446,7 +1448,7 @@ __Arguments__ * `opts` - Can be either an object with `times` and `interval` or a number. * `times` - The number of attempts to make before giving up. The default is `5`. * `interval` - The time to wait between retries, in milliseconds. The default is `0`. - * If `opts` is a number, the number specifies the number of times to retry, with the default interval of `0`. + * If `opts` is a number, the number specifies the number of times to retry, with the default interval of `0`. * `task(callback, results)` - A function which receives two arguments: (1) a `callback(err, result)` which must be called when finished, passing `err` (which can be `null`) and the `result` of the function's execution, and (2) a `results` object, containing the results of @@ -1464,14 +1466,14 @@ async.retry(3, apiMethod, function(err, result) { ``` ```js -// try calling apiMethod 3 times, waiting 200 ms between each retry +// try calling apiMethod 3 times, waiting 200 ms between each retry async.retry({times: 3, interval: 200}, apiMethod, function(err, result) { // do something with the result }); ``` ```js -// try calling apiMethod the default 5 times no delay between each retry +// try calling apiMethod the default 5 times no delay between each retry async.retry(apiMethod, function(err, result) { // do something with the result }); @@ -1792,7 +1794,7 @@ async.waterfall([ return db.model.create(contents); }), function (model, next) { - // `model` is the instantiated model object. + // `model` is the instantiated model object. // If there was an error, this function would be skipped. } ], callback) |