summaryrefslogtreecommitdiff
path: root/lib/timesSeries.js
blob: a610b11661bcb96f8d1f3ca9ae4e2d618bcb2cdc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
'use strict';

import timesLimit from './timesLimit';
import doLimit from './internal/doLimit';

/**
 * The same as {@link async.times} but runs only a single async operation at a time.
 *
 * @name timesSeries
 * @static
 * @memberOf async
 * @see async.times
 * @category Control Flow
 * @param {number} n - The number of times to run the function.
 * @param {Function} iteratee - The function to call `n` times. Invoked with the
 * iteration index and a callback (n, next).
 * @param {Function} callback - see {@link async.map}.
 */
export default doLimit(timesLimit, 1);