'use strict';12Object.defineProperty(exports, "__esModule", {3value: true4});56var _eachOfLimit2 = require('./internal/eachOfLimit.js');78var _eachOfLimit3 = _interopRequireDefault(_eachOfLimit2);910var _wrapAsync = require('./internal/wrapAsync.js');1112var _wrapAsync2 = _interopRequireDefault(_wrapAsync);1314var _awaitify = require('./internal/awaitify.js');1516var _awaitify2 = _interopRequireDefault(_awaitify);1718function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }1920/**21* The same as [`eachOf`]{@link module:Collections.eachOf} but runs a maximum of `limit` async operations at a22* time.23*24* @name eachOfLimit25* @static26* @memberOf module:Collections27* @method28* @see [async.eachOf]{@link module:Collections.eachOf}29* @alias forEachOfLimit30* @category Collection31* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.32* @param {number} limit - The maximum number of async operations at a time.33* @param {AsyncFunction} iteratee - An async function to apply to each34* item in `coll`. The `key` is the item's key, or index in the case of an35* array.36* Invoked with (item, key, callback).37* @param {Function} [callback] - A callback which is called when all38* `iteratee` functions have finished, or an error occurs. Invoked with (err).39* @returns {Promise} a promise, if a callback is omitted40*/41function eachOfLimit(coll, limit, iteratee, callback) {42return (0, _eachOfLimit3.default)(limit)(coll, (0, _wrapAsync2.default)(iteratee), callback);43}4445exports.default = (0, _awaitify2.default)(eachOfLimit, 4);46module.exports = exports['default'];4748