diff options
author | charlierudolph <charles.rudolph@originate.com> | 2015-07-16 16:40:29 -0700 |
---|---|---|
committer | charlierudolph <charles.rudolph@originate.com> | 2015-07-16 16:40:29 -0700 |
commit | ffa3baedc8e0119711703217296a619bf5e60b39 (patch) | |
tree | 92712d04d9b8c98fb637985f5d880fb3f2343ef0 | |
parent | bb21b4ad61dacad5393df894ea5f2add7a8937b3 (diff) | |
download | async-ffa3baedc8e0119711703217296a619bf5e60b39.tar.gz |
update README
-rw-r--r-- | README.md | 35 |
1 files changed, 10 insertions, 25 deletions
@@ -103,7 +103,7 @@ async.waterfall([ callback(new Error("failed getting something:" + err.message)); // we should return here } - // since we did not return, this callback still will be called and + // since we did not return, this callback still will be called and // `processData` will be called twice callback(result); }); @@ -196,11 +196,9 @@ Some functions are also available in the following forms: * [`reduce`](#reduce), [`reduceRight`](#reduceRight) * [`detect`](#detect), `detectSeries` * [`sortBy`](#sortBy) -* [`some`](#some) -* [`someLimit`](#someLimit) -* [`every`](#every) -* [`concat`](#concat) -* [`concatSeries`](#concatSeries) +* [`some`](#some), `someLimit` +* [`every`](#every), `everyLimit` +* [`concat`](#concat), `concatSeries` ### Control Flow @@ -606,26 +604,9 @@ async.some(['file1','file2','file3'], fs.exists, function(result){ }); ``` ---------------------------------------- - -<a name="someLimit" /> -### someLimit(arr, limit, iterator, callback) - -__Alias:__ `anyLimit` - -The same as [`some`](#some), only no more than `limit` `iterator`s will be simultaneously -running at any time. +__Related__ -__Arguments__ - -* `arr` - An array to iterate over. -* `limit` - The maximum number of `iterator`s to run at any time. -* `iterator(item, callback)` - A truth test to apply to each item in the array - in parallel. The iterator is passed a callback(truthValue) which must be - called with a boolean argument once it has completed. -* `callback(result)` - A callback which is called as soon as any iterator returns - `true`, or after all the iterator functions have finished. Result will be - either `true` or `false` depending on the values of the async tests. +* someLimit(arr, limit, iterator, callback) --------------------------------------- @@ -659,6 +640,10 @@ async.every(['file1','file2','file3'], fs.exists, function(result){ }); ``` +__Related__ + +* everyLimit(arr, limit, iterator, callback) + --------------------------------------- <a name="concat" /> |