mapValuesSeries.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. 'use strict';
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. var _mapValuesLimit = require('./mapValuesLimit');
  6. var _mapValuesLimit2 = _interopRequireDefault(_mapValuesLimit);
  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 [`mapValues`]{@link module:Collections.mapValues} but runs only a single async operation at a time.
  12. *
  13. * @name mapValuesSeries
  14. * @static
  15. * @memberOf module:Collections
  16. * @method
  17. * @see [async.mapValues]{@link module:Collections.mapValues}
  18. * @category Collection
  19. * @param {Object} obj - A collection to iterate over.
  20. * @param {Function} iteratee - A function to apply to each value in `obj`.
  21. * The iteratee is passed a `callback(err, transformed)` which must be called
  22. * once it has completed with an error (which can be `null`) and a
  23. * transformed value. Invoked with (value, key, callback).
  24. * @param {Function} [callback] - A callback which is called when all `iteratee`
  25. * functions have finished, or an error occurs. Result is an object of the
  26. * transformed values from the `obj`. Invoked with (err, result).
  27. */
  28. exports.default = (0, _doLimit2.default)(_mapValuesLimit2.default, 1);
  29. module.exports = exports['default'];