From ffa3baedc8e0119711703217296a619bf5e60b39 Mon Sep 17 00:00:00 2001 From: charlierudolph Date: Thu, 16 Jul 2015 16:40:29 -0700 Subject: update README --- README.md | 35 ++++++++++------------------------- 1 file changed, 10 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 4ad483d..cbe32e4 100644 --- a/README.md +++ b/README.md @@ -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){ }); ``` ---------------------------------------- - - -### 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) + --------------------------------------- -- cgit v1.2.1