summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Early <alexander.early@gmail.com>2016-07-12 14:33:12 -0700
committerGitHub <noreply@github.com>2016-07-12 14:33:12 -0700
commit8b36d1214067d77202044438b2ec485de26b4ab7 (patch)
tree95ec1037789608c8a5c1e627e87a9ec7a6fd19e9
parent606fd9e925238596c45dd201582bc2da162bcc9d (diff)
parente6b54c7995aa7a0e165f7eb80295db7df5d96f37 (diff)
downloadasync-8b36d1214067d77202044438b2ec485de26b4ab7.tar.gz
Merge pull request #1236 from caolan/iterable-docs
Iterable docs
-rw-r--r--lib/applyEach.js2
-rw-r--r--lib/applyEachSeries.js2
-rw-r--r--lib/concat.js2
-rw-r--r--lib/concatSeries.js2
-rw-r--r--lib/detect.js2
-rw-r--r--lib/detectLimit.js2
-rw-r--r--lib/detectSeries.js2
-rw-r--r--lib/each.js2
-rw-r--r--lib/eachLimit.js2
-rw-r--r--lib/eachOf.js2
-rw-r--r--lib/eachOfLimit.js2
-rw-r--r--lib/eachOfSeries.js2
-rw-r--r--lib/eachSeries.js2
-rw-r--r--lib/every.js2
-rw-r--r--lib/everyLimit.js2
-rw-r--r--lib/everySeries.js2
-rw-r--r--lib/filter.js2
-rw-r--r--lib/filterLimit.js2
-rw-r--r--lib/filterSeries.js2
-rw-r--r--lib/map.js2
-rw-r--r--lib/mapLimit.js2
-rw-r--r--lib/mapSeries.js2
-rw-r--r--lib/parallel.js2
-rw-r--r--lib/reduce.js2
-rw-r--r--lib/reduceRight.js8
-rw-r--r--lib/reject.js2
-rw-r--r--lib/rejectLimit.js2
-rw-r--r--lib/rejectSeries.js2
-rw-r--r--lib/series.js2
-rw-r--r--lib/some.js2
-rw-r--r--lib/someLimit.js2
-rw-r--r--lib/someSeries.js2
-rw-r--r--lib/sortBy.js2
-rw-r--r--lib/transform.js2
34 files changed, 37 insertions, 37 deletions
diff --git a/lib/applyEach.js b/lib/applyEach.js
index c106114..a776ce8 100644
--- a/lib/applyEach.js
+++ b/lib/applyEach.js
@@ -12,7 +12,7 @@ import map from './map';
* @memberOf module:ControlFlow
* @method
* @category Control Flow
- * @param {Array|Object} fns - A collection of asynchronous functions to all
+ * @param {Array|Iterable|Object} fns - A collection of asynchronous functions to all
* call with the same arguments
* @param {...*} [args] - any number of separate arguments to pass to the
* function.
diff --git a/lib/applyEachSeries.js b/lib/applyEachSeries.js
index f0919cb..5a7c257 100644
--- a/lib/applyEachSeries.js
+++ b/lib/applyEachSeries.js
@@ -10,7 +10,7 @@ import mapSeries from './mapSeries';
* @method
* @see [async.applyEach]{@link module:ControlFlow.applyEach}
* @category Control Flow
- * @param {Array|Object} fns - A collection of asynchronous functions to all
+ * @param {Array|Iterable|Object} fns - A collection of asynchronous functions to all
* call with the same arguments
* @param {...*} [args] - any number of separate arguments to pass to the
* function.
diff --git a/lib/concat.js b/lib/concat.js
index db23737..ba4ea13 100644
--- a/lib/concat.js
+++ b/lib/concat.js
@@ -13,7 +13,7 @@ import doParallel from './internal/doParallel';
* @memberOf module:Collections
* @method
* @category Collection
- * @param {Array|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
* @param {Function} iteratee - A function to apply to each item in `coll`.
* The iteratee is passed a `callback(err, results)` which must be called once
* it has completed with an error (which can be `null`) and an array of results.
diff --git a/lib/concatSeries.js b/lib/concatSeries.js
index c5dfb61..77b439b 100644
--- a/lib/concatSeries.js
+++ b/lib/concatSeries.js
@@ -10,7 +10,7 @@ import doSeries from './internal/doSeries';
* @method
* @see [async.concat]{@link module:Collections.concat}
* @category Collection
- * @param {Array|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
* @param {Function} iteratee - A function to apply to each item in `coll`.
* The iteratee is passed a `callback(err, results)` which must be called once
* it has completed with an error (which can be `null`) and an array of results.
diff --git a/lib/detect.js b/lib/detect.js
index 3aff790..8119b05 100644
--- a/lib/detect.js
+++ b/lib/detect.js
@@ -20,7 +20,7 @@ import findGetResult from './internal/findGetResult';
* @method
* @alias find
* @category Collections
- * @param {Array|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
* @param {Function} iteratee - A truth test to apply to each item in `coll`.
* The iteratee is passed a `callback(err, truthValue)` which must be called
* with a boolean argument once it has completed. Invoked with (item, callback).
diff --git a/lib/detectLimit.js b/lib/detectLimit.js
index da54bd6..cefff55 100644
--- a/lib/detectLimit.js
+++ b/lib/detectLimit.js
@@ -15,7 +15,7 @@ import findGetResult from './internal/findGetResult';
* @see [async.detect]{@link module:Collections.detect}
* @alias findLimit
* @category Collections
- * @param {Array|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
* @param {number} limit - The maximum number of async operations at a time.
* @param {Function} iteratee - A truth test to apply to each item in `coll`.
* The iteratee is passed a `callback(err, truthValue)` which must be called
diff --git a/lib/detectSeries.js b/lib/detectSeries.js
index fd29343..3086a62 100644
--- a/lib/detectSeries.js
+++ b/lib/detectSeries.js
@@ -14,7 +14,7 @@ import findGetResult from './internal/findGetResult';
* @see [async.detect]{@link module:Collections.detect}
* @alias findSeries
* @category Collections
- * @param {Array|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
* @param {Function} iteratee - A truth test to apply to each item in `coll`.
* The iteratee is passed a `callback(err, truthValue)` which must be called
* with a boolean argument once it has completed. Invoked with (item, callback).
diff --git a/lib/each.js b/lib/each.js
index aab1d3d..dc8c501 100644
--- a/lib/each.js
+++ b/lib/each.js
@@ -17,7 +17,7 @@ import doLimit from './internal/doLimit';
* @method
* @alias forEach
* @category Collection
- * @param {Array|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
* @param {Function} iteratee - A function to apply to each item
* in `coll`. The iteratee is passed a `callback(err)` which must be called once
* it has completed. If no error has occurred, the `callback` should be run
diff --git a/lib/eachLimit.js b/lib/eachLimit.js
index a46eb9d..c6bce8c 100644
--- a/lib/eachLimit.js
+++ b/lib/eachLimit.js
@@ -11,7 +11,7 @@ import withoutIndex from './internal/withoutIndex';
* @see [async.each]{@link module:Collections.each}
* @alias forEachLimit
* @category Collection
- * @param {Array|Object} coll - A colleciton to iterate over.
+ * @param {Array|Iterable|Object} coll - A colleciton to iterate over.
* @param {number} limit - The maximum number of async operations at a time.
* @param {Function} iteratee - A function to apply to each item in `coll`. The
* iteratee is passed a `callback(err)` which must be called once it has
diff --git a/lib/eachOf.js b/lib/eachOf.js
index b51fefb..4d453c5 100644
--- a/lib/eachOf.js
+++ b/lib/eachOf.js
@@ -12,7 +12,7 @@ import doLimit from './internal/doLimit';
* @alias forEachOf
* @category Collection
* @see [async.each]{@link module:Collections.each}
- * @param {Array|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
* @param {Function} iteratee - A function to apply to each
* item in `coll`. The `key` is the item's key, or index in the case of an
* array. The iteratee is passed a `callback(err)` which must be called once it
diff --git a/lib/eachOfLimit.js b/lib/eachOfLimit.js
index 55d60e3..c3b4567 100644
--- a/lib/eachOfLimit.js
+++ b/lib/eachOfLimit.js
@@ -11,7 +11,7 @@ import _eachOfLimit from './internal/eachOfLimit';
* @see [async.eachOf]{@link module:Collections.eachOf}
* @alias forEachOfLimit
* @category Collection
- * @param {Array|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
* @param {number} limit - The maximum number of async operations at a time.
* @param {Function} iteratee - A function to apply to each
* item in `coll`. The `key` is the item's key, or index in the case of an
diff --git a/lib/eachOfSeries.js b/lib/eachOfSeries.js
index 32003a8..21e816d 100644
--- a/lib/eachOfSeries.js
+++ b/lib/eachOfSeries.js
@@ -11,7 +11,7 @@ import doLimit from './internal/doLimit';
* @see [async.eachOf]{@link module:Collections.eachOf}
* @alias forEachOfSeries
* @category Collection
- * @param {Array|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
* @param {Function} iteratee - A function to apply to each item in `coll`. The
* `key` is the item's key, or index in the case of an array. The iteratee is
* passed a `callback(err)` which must be called once it has completed. If no
diff --git a/lib/eachSeries.js b/lib/eachSeries.js
index 1b8e589..0839d8c 100644
--- a/lib/eachSeries.js
+++ b/lib/eachSeries.js
@@ -11,7 +11,7 @@ import doLimit from './internal/doLimit';
* @see [async.each]{@link module:Collections.each}
* @alias forEachSeries
* @category Collection
- * @param {Array|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
* @param {Function} iteratee - A function to apply to each
* item in `coll`. The iteratee is passed a `callback(err)` which must be called
* once it has completed. If no error has occurred, the `callback` should be run
diff --git a/lib/every.js b/lib/every.js
index 147c54a..8b2ad05 100644
--- a/lib/every.js
+++ b/lib/every.js
@@ -11,7 +11,7 @@ import doLimit from './internal/doLimit';
* @method
* @alias all
* @category Collection
- * @param {Array|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
* @param {Function} iteratee - A truth test to apply to each item in the
* collection in parallel. The iteratee is passed a `callback(err, truthValue)`
* which must be called with a boolean argument once it has completed. Invoked
diff --git a/lib/everyLimit.js b/lib/everyLimit.js
index 1ba2858..9bcebb1 100644
--- a/lib/everyLimit.js
+++ b/lib/everyLimit.js
@@ -12,7 +12,7 @@ import notId from './internal/notId';
* @see [async.every]{@link module:Collections.every}
* @alias allLimit
* @category Collection
- * @param {Array|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
* @param {number} limit - The maximum number of async operations at a time.
* @param {Function} iteratee - A truth test to apply to each item in the
* collection in parallel. The iteratee is passed a `callback(err, truthValue)`
diff --git a/lib/everySeries.js b/lib/everySeries.js
index 3cdadf0..7434748 100644
--- a/lib/everySeries.js
+++ b/lib/everySeries.js
@@ -11,7 +11,7 @@ import doLimit from './internal/doLimit';
* @see [async.every]{@link module:Collections.every}
* @alias allSeries
* @category Collection
- * @param {Array|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
* @param {Function} iteratee - A truth test to apply to each item in the
* collection in parallel. The iteratee is passed a `callback(err, truthValue)`
* which must be called with a boolean argument once it has completed. Invoked
diff --git a/lib/filter.js b/lib/filter.js
index b858fea..e6d3010 100644
--- a/lib/filter.js
+++ b/lib/filter.js
@@ -12,7 +12,7 @@ import doLimit from './internal/doLimit';
* @method
* @alias select
* @category Collection
- * @param {Array|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
* @param {Function} iteratee - A truth test to apply to each item in `coll`.
* The `iteratee` is passed a `callback(err, truthValue)`, which must be called
* with a boolean argument once it has completed. Invoked with (item, callback).
diff --git a/lib/filterLimit.js b/lib/filterLimit.js
index 6d429e8..2c05364 100644
--- a/lib/filterLimit.js
+++ b/lib/filterLimit.js
@@ -12,7 +12,7 @@ import doParallelLimit from './internal/doParallelLimit';
* @see [async.filter]{@link module:Collections.filter}
* @alias selectLimit
* @category Collection
- * @param {Array|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
* @param {number} limit - The maximum number of async operations at a time.
* @param {Function} iteratee - A truth test to apply to each item in `coll`.
* The `iteratee` is passed a `callback(err, truthValue)`, which must be called
diff --git a/lib/filterSeries.js b/lib/filterSeries.js
index 781e4eb..c973c14 100644
--- a/lib/filterSeries.js
+++ b/lib/filterSeries.js
@@ -11,7 +11,7 @@ import doLimit from './internal/doLimit';
* @see [async.filter]{@link module:Collections.filter}
* @alias selectSeries
* @category Collection
- * @param {Array|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
* @param {Function} iteratee - A truth test to apply to each item in `coll`.
* The `iteratee` is passed a `callback(err, truthValue)`, which must be called
* with a boolean argument once it has completed. Invoked with (item, callback).
diff --git a/lib/map.js b/lib/map.js
index 24af6fb..eecab03 100644
--- a/lib/map.js
+++ b/lib/map.js
@@ -23,7 +23,7 @@ import doLimit from './internal/doLimit';
* @memberOf module:Collections
* @method
* @category Collection
- * @param {Array|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
* @param {Function} iteratee - A function to apply to each item in `coll`.
* The iteratee is passed a `callback(err, transformed)` which must be called
* once it has completed with an error (which can be `null`) and a
diff --git a/lib/mapLimit.js b/lib/mapLimit.js
index efaff2b..a54922d 100644
--- a/lib/mapLimit.js
+++ b/lib/mapLimit.js
@@ -10,7 +10,7 @@ import map from './internal/map';
* @method
* @see [async.map]{@link module:Collections.map}
* @category Collection
- * @param {Array|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
* @param {number} limit - The maximum number of async operations at a time.
* @param {Function} iteratee - A function to apply to each item in `coll`.
* The iteratee is passed a `callback(err, transformed)` which must be called
diff --git a/lib/mapSeries.js b/lib/mapSeries.js
index 24ce126..e1f3d0d 100644
--- a/lib/mapSeries.js
+++ b/lib/mapSeries.js
@@ -10,7 +10,7 @@ import doLimit from './internal/doLimit';
* @method
* @see [async.map]{@link module:Collections.map}
* @category Collection
- * @param {Array|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
* @param {Function} iteratee - A function to apply to each item in `coll`.
* The iteratee is passed a `callback(err, transformed)` which must be called
* once it has completed with an error (which can be `null`) and a
diff --git a/lib/parallel.js b/lib/parallel.js
index 1f6a3cc..67d6180 100644
--- a/lib/parallel.js
+++ b/lib/parallel.js
@@ -24,7 +24,7 @@ import doLimit from './internal/doLimit';
* @memberOf module:ControlFlow
* @method
* @category Control Flow
- * @param {Array|Object} tasks - A collection containing functions to run.
+ * @param {Array|Iterable|Object} tasks - A collection containing functions to run.
* Each function is passed a `callback(err, result)` which it must call on
* completion with an error `err` (which can be `null`) and an optional `result`
* value.
diff --git a/lib/reduce.js b/lib/reduce.js
index 4718631..d2fe1c2 100644
--- a/lib/reduce.js
+++ b/lib/reduce.js
@@ -20,7 +20,7 @@ import once from './internal/once';
* @alias inject
* @alias foldl
* @category Collection
- * @param {Array|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
* @param {*} memo - The initial state of the reduction.
* @param {Function} iteratee - A function applied to each item in the
* array to produce the next step in the reduction. The `iteratee` is passed a
diff --git a/lib/reduceRight.js b/lib/reduceRight.js
index 69fd158..844c94f 100644
--- a/lib/reduceRight.js
+++ b/lib/reduceRight.js
@@ -3,7 +3,7 @@ import reduce from './reduce';
var slice = Array.prototype.slice;
/**
- * Same as [`reduce`]{@link module:Collections.reduce}, only operates on `coll` in reverse order.
+ * Same as [`reduce`]{@link module:Collections.reduce}, only operates on `array` in reverse order.
*
* @name reduceRight
* @static
@@ -12,7 +12,7 @@ var slice = Array.prototype.slice;
* @see [async.reduce]{@link module:Collections.reduce}
* @alias foldr
* @category Collection
- * @param {Array|Object} coll - A collection to iterate over.
+ * @param {Array} array - A collection to iterate over.
* @param {*} memo - The initial state of the reduction.
* @param {Function} iteratee - A function applied to each item in the
* array to produce the next step in the reduction. The `iteratee` is passed a
@@ -24,7 +24,7 @@ var slice = Array.prototype.slice;
* `iteratee` functions have finished. Result is the reduced value. Invoked with
* (err, result).
*/
-export default function reduceRight (coll, memo, iteratee, callback) {
- var reversed = slice.call(coll).reverse();
+export default function reduceRight (array, memo, iteratee, callback) {
+ var reversed = slice.call(array).reverse();
reduce(reversed, memo, iteratee, callback);
}
diff --git a/lib/reject.js b/lib/reject.js
index f882a93..8607614 100644
--- a/lib/reject.js
+++ b/lib/reject.js
@@ -10,7 +10,7 @@ import doLimit from './internal/doLimit';
* @method
* @see [async.filter]{@link module:Collections.filter}
* @category Collection
- * @param {Array|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
* @param {Function} iteratee - A truth test to apply to each item in `coll`.
* The `iteratee` is passed a `callback(err, truthValue)`, which must be called
* with a boolean argument once it has completed. Invoked with (item, callback).
diff --git a/lib/rejectLimit.js b/lib/rejectLimit.js
index 2a57bc7..977bc4c 100644
--- a/lib/rejectLimit.js
+++ b/lib/rejectLimit.js
@@ -11,7 +11,7 @@ import doParallelLimit from './internal/doParallelLimit';
* @method
* @see [async.reject]{@link module:Collections.reject}
* @category Collection
- * @param {Array|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
* @param {number} limit - The maximum number of async operations at a time.
* @param {Function} iteratee - A truth test to apply to each item in `coll`.
* The `iteratee` is passed a `callback(err, truthValue)`, which must be called
diff --git a/lib/rejectSeries.js b/lib/rejectSeries.js
index 0844864..0bb925e 100644
--- a/lib/rejectSeries.js
+++ b/lib/rejectSeries.js
@@ -10,7 +10,7 @@ import doLimit from './internal/doLimit';
* @method
* @see [async.reject]{@link module:Collections.reject}
* @category Collection
- * @param {Array|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
* @param {Function} iteratee - A truth test to apply to each item in `coll`.
* The `iteratee` is passed a `callback(err, truthValue)`, which must be called
* with a boolean argument once it has completed. Invoked with (item, callback).
diff --git a/lib/series.js b/lib/series.js
index 1969943..7955cf2 100644
--- a/lib/series.js
+++ b/lib/series.js
@@ -27,7 +27,7 @@ import eachOfSeries from './eachOfSeries';
* @memberOf module:ControlFlow
* @method
* @category Control Flow
- * @param {Array|Object} tasks - A collection containing functions to run, each
+ * @param {Array|Iterable|Object} tasks - A collection containing functions to run, each
* function is passed a `callback(err, result)` it must call on completion with
* an error `err` (which can be `null`) and an optional `result` value.
* @param {Function} [callback] - An optional callback to run once all the
diff --git a/lib/some.js b/lib/some.js
index ff777e5..7b5341c 100644
--- a/lib/some.js
+++ b/lib/some.js
@@ -12,7 +12,7 @@ import doLimit from './internal/doLimit';
* @method
* @alias any
* @category Collection
- * @param {Array|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
* @param {Function} iteratee - A truth test to apply to each item in the array
* in parallel. The iteratee is passed a `callback(err, truthValue)` which must
* be called with a boolean argument once it has completed. Invoked with
diff --git a/lib/someLimit.js b/lib/someLimit.js
index ad65721..2ef4f78 100644
--- a/lib/someLimit.js
+++ b/lib/someLimit.js
@@ -12,7 +12,7 @@ import identity from 'lodash/identity';
* @see [async.some]{@link module:Collections.some}
* @alias anyLimit
* @category Collection
- * @param {Array|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
* @param {number} limit - The maximum number of async operations at a time.
* @param {Function} iteratee - A truth test to apply to each item in the array
* in parallel. The iteratee is passed a `callback(err, truthValue)` which must
diff --git a/lib/someSeries.js b/lib/someSeries.js
index cc30c36..8357a8b 100644
--- a/lib/someSeries.js
+++ b/lib/someSeries.js
@@ -11,7 +11,7 @@ import doLimit from './internal/doLimit';
* @see [async.some]{@link module:Collections.some}
* @alias anySeries
* @category Collection
- * @param {Array|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
* @param {Function} iteratee - A truth test to apply to each item in the array
* in parallel. The iteratee is passed a `callback(err, truthValue)` which must
* be called with a boolean argument once it has completed. Invoked with
diff --git a/lib/sortBy.js b/lib/sortBy.js
index 9b8ffe6..c829200 100644
--- a/lib/sortBy.js
+++ b/lib/sortBy.js
@@ -12,7 +12,7 @@ import map from './map';
* @memberOf module:Collections
* @method
* @category Collection
- * @param {Array|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
* @param {Function} iteratee - A function to apply to each item in `coll`.
* The iteratee is passed a `callback(err, sortValue)` which must be called once
* it has completed with an error (which can be `null`) and a value to use as
diff --git a/lib/transform.js b/lib/transform.js
index 175ad85..5d1342a 100644
--- a/lib/transform.js
+++ b/lib/transform.js
@@ -14,7 +14,7 @@ import once from './internal/once';
* @memberOf module:Collections
* @method
* @category Collection
- * @param {Array|Object} coll - A collection to iterate over.
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
* @param {*} [accumulator] - The initial state of the transform. If omitted,
* it will default to an empty Object or Array, depending on the type of `coll`
* @param {Function} iteratee - A function applied to each item in the