Repositorio del curso CCOM4030 el semestre B91 del proyecto Artesanías con el Instituto de Cultura

mapLimit.js 1.3KB

12345678910111213141516171819202122232425262728293031323334353637
  1. 'use strict';
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. var _doParallelLimit = require('./internal/doParallelLimit');
  6. var _doParallelLimit2 = _interopRequireDefault(_doParallelLimit);
  7. var _map = require('./internal/map');
  8. var _map2 = _interopRequireDefault(_map);
  9. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  10. /**
  11. * The same as [`map`]{@link module:Collections.map} but runs a maximum of `limit` async operations at a time.
  12. *
  13. * @name mapLimit
  14. * @static
  15. * @memberOf module:Collections
  16. * @method
  17. * @see [async.map]{@link module:Collections.map}
  18. * @category Collection
  19. * @param {Array|Iterable|Object} coll - A collection to iterate over.
  20. * @param {number} limit - The maximum number of async operations at a time.
  21. * @param {AsyncFunction} iteratee - An async function to apply to each item in
  22. * `coll`.
  23. * The iteratee should complete with the transformed item.
  24. * Invoked with (item, callback).
  25. * @param {Function} [callback] - A callback which is called when all `iteratee`
  26. * functions have finished, or an error occurs. Results is an array of the
  27. * transformed items from the `coll`. Invoked with (err, results).
  28. */
  29. exports.default = (0, _doParallelLimit2.default)(_map2.default);
  30. module.exports = exports['default'];