'use strict';12Object.defineProperty(exports, "__esModule", {3value: true4});56var _eachOfLimit = require('./internal/eachOfLimit.js');78var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit);910var _withoutIndex = require('./internal/withoutIndex.js');1112var _withoutIndex2 = _interopRequireDefault(_withoutIndex);1314var _wrapAsync = require('./internal/wrapAsync.js');1516var _wrapAsync2 = _interopRequireDefault(_wrapAsync);1718var _awaitify = require('./internal/awaitify.js');1920var _awaitify2 = _interopRequireDefault(_awaitify);2122function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }2324/**25* The same as [`each`]{@link module:Collections.each} but runs a maximum of `limit` async operations at a time.26*27* @name eachLimit28* @static29* @memberOf module:Collections30* @method31* @see [async.each]{@link module:Collections.each}32* @alias forEachLimit33* @category Collection34* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.35* @param {number} limit - The maximum number of async operations at a time.36* @param {AsyncFunction} iteratee - An async function to apply to each item in37* `coll`.38* The array index is not passed to the iteratee.39* If you need the index, use `eachOfLimit`.40* Invoked with (item, callback).41* @param {Function} [callback] - A callback which is called when all42* `iteratee` functions have finished, or an error occurs. Invoked with (err).43* @returns {Promise} a promise, if a callback is omitted44*/45function eachLimit(coll, limit, iteratee, callback) {46return (0, _eachOfLimit2.default)(limit)(coll, (0, _withoutIndex2.default)((0, _wrapAsync2.default)(iteratee)), callback);47}48exports.default = (0, _awaitify2.default)(eachLimit, 4);49module.exports = exports['default'];5051