You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.2 KiB

4 years ago
  1. 'use strict';
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. var _mapLimit = require('./mapLimit');
  6. var _mapLimit2 = _interopRequireDefault(_mapLimit);
  7. var _doLimit = require('./internal/doLimit');
  8. var _doLimit2 = _interopRequireDefault(_doLimit);
  9. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  10. /**
  11. * The same as [`map`]{@link module:Collections.map} but runs only a single async operation at a time.
  12. *
  13. * @name mapSeries
  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 {AsyncFunction} iteratee - An async function to apply to each item in
  21. * `coll`.
  22. * The iteratee should complete with the transformed item.
  23. * Invoked with (item, callback).
  24. * @param {Function} [callback] - A callback which is called when all `iteratee`
  25. * functions have finished, or an error occurs. Results is an array of the
  26. * transformed items from the `coll`. Invoked with (err, results).
  27. */
  28. exports.default = (0, _doLimit2.default)(_mapLimit2.default, 1);
  29. module.exports = exports['default'];