basant307/AI_Governance_Project
045
1'use strict';2 3Object.defineProperty(exports, "__esModule", {4 value: true5});6exports.default = timesSeries;7 8var _timesLimit = require('./timesLimit.js');9 10var _timesLimit2 = _interopRequireDefault(_timesLimit);11 12function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }13 14/**15 * The same as [times]{@link module:ControlFlow.times} but runs only a single async operation at a time.16 *17 * @name timesSeries18 * @static19 * @memberOf module:ControlFlow20 * @method21 * @see [async.times]{@link module:ControlFlow.times}22 * @category Control Flow23 * @param {number} n - The number of times to run the function.24 * @param {AsyncFunction} iteratee - The async function to call `n` times.25 * Invoked with the iteration index and a callback: (n, next).26 * @param {Function} callback - see {@link module:Collections.map}.27 * @returns {Promise} a promise, if no callback is provided28 */29function timesSeries(n, iteratee, callback) {30 return (0, _timesLimit2.default)(n, 1, iteratee, callback);31}32module.exports = exports.default;