diff options
Diffstat (limited to 'lib/timesSeries.js')
-rw-r--r-- | lib/timesSeries.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/timesSeries.js b/lib/timesSeries.js index 17ec0ca..b56f6ec 100644 --- a/lib/timesSeries.js +++ b/lib/timesSeries.js @@ -1,5 +1,4 @@ import timesLimit from './timesLimit'; -import doLimit from './internal/doLimit'; /** * The same as [times]{@link module:ControlFlow.times} but runs only a single async operation at a time. @@ -14,5 +13,8 @@ import doLimit from './internal/doLimit'; * @param {AsyncFunction} iteratee - The async function to call `n` times. * Invoked with the iteration index and a callback: (n, next). * @param {Function} callback - see {@link module:Collections.map}. + * @returns {Promise} a promise, if no callback is provided */ -export default doLimit(timesLimit, 1); +export default function timesSeries (n, iteratee, callback) { + return timesLimit(n, 1, iteratee, callback) +} |