summaryrefslogtreecommitdiff
path: root/lib/applyEachSeries.js
blob: 1181d945ebd5fdc68d0e9c41ed891f6b218c1baa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import applyEach from './internal/applyEach';
import mapSeries from './mapSeries';

/**
 * The same as `applyEach` but runs only a single async operation at a time.
 *
 * @name applyEachSeries
 * @static
 * @memberOf module:async
 * @method
 * @see [async.applyEach]{@link module:async.applyEach}
 * @category Control Flow
 * @param {Array|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.
 * @param {Function} [callback] - the final argument should be the callback,
 * called when all functions have completed processing.
 * @returns {Function} - If only the first argument is provided, it will return
 * a function which lets you pass in the arguments as if it were a single
 * function call.
 */
export default applyEach(mapSeries);