From 548ae8db6383059f493d8bcb88cbc3d1c4b2f315 Mon Sep 17 00:00:00 2001 From: Graeme Yeates Date: Tue, 12 Jul 2016 16:51:15 -0400 Subject: Document methods which take iterables --- lib/applyEach.js | 2 +- lib/applyEachSeries.js | 2 +- lib/concat.js | 2 +- lib/concatSeries.js | 2 +- lib/detect.js | 2 +- lib/detectLimit.js | 2 +- lib/detectSeries.js | 2 +- lib/each.js | 2 +- lib/eachLimit.js | 2 +- lib/eachOf.js | 2 +- lib/eachOfLimit.js | 2 +- lib/eachOfSeries.js | 2 +- lib/eachSeries.js | 2 +- lib/every.js | 2 +- lib/everyLimit.js | 2 +- lib/everySeries.js | 2 +- lib/filter.js | 2 +- lib/filterLimit.js | 2 +- lib/filterSeries.js | 2 +- lib/map.js | 2 +- lib/mapLimit.js | 2 +- lib/mapSeries.js | 2 +- lib/parallel.js | 2 +- lib/reduce.js | 2 +- lib/reduceRight.js | 2 +- lib/reject.js | 2 +- lib/rejectLimit.js | 2 +- lib/rejectSeries.js | 2 +- lib/series.js | 2 +- lib/some.js | 2 +- lib/someLimit.js | 2 +- lib/someSeries.js | 2 +- lib/sortBy.js | 2 +- lib/transform.js | 2 +- 34 files changed, 34 insertions(+), 34 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..1f976fe 100644 --- a/lib/reduceRight.js +++ b/lib/reduceRight.js @@ -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|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/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 -- cgit v1.2.1