3 Object.defineProperty(exports, "__esModule", {
6 exports.default = eachOfLimit;
8 var _eachOfLimit2 = require('./internal/eachOfLimit');
10 var _eachOfLimit3 = _interopRequireDefault(_eachOfLimit2);
12 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15 * The same as [`eachOf`]{@link module:Collections.eachOf} but runs a maximum of `limit` async operations at a
20 * @memberOf module:Collections
22 * @see [async.eachOf]{@link module:Collections.eachOf}
23 * @alias forEachOfLimit
24 * @category Collection
25 * @param {Array|Iterable|Object} coll - A collection to iterate over.
26 * @param {number} limit - The maximum number of async operations at a time.
27 * @param {Function} iteratee - A function to apply to each
28 * item in `coll`. The `key` is the item's key, or index in the case of an
29 * array. The iteratee is passed a `callback(err)` which must be called once it
30 * has completed. If no error has occurred, the callback should be run without
31 * arguments or with an explicit `null` argument. Invoked with
32 * (item, key, callback).
33 * @param {Function} [callback] - A callback which is called when all
34 * `iteratee` functions have finished, or an error occurs. Invoked with (err).
36 function eachOfLimit(coll, limit, iteratee, callback) {
37 (0, _eachOfLimit3.default)(limit)(coll, iteratee, callback);
39 module.exports = exports['default'];