someSeries.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. 'use strict';
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. var _someLimit = require('./someLimit');
  6. var _someLimit2 = _interopRequireDefault(_someLimit);
  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 [`some`]{@link module:Collections.some} but runs only a single async operation at a time.
  12. *
  13. * @name someSeries
  14. * @static
  15. * @memberOf module:Collections
  16. * @method
  17. * @see [async.some]{@link module:Collections.some}
  18. * @alias anySeries
  19. * @category Collection
  20. * @param {Array|Iterable|Object} coll - A collection to iterate over.
  21. * @param {AsyncFunction} iteratee - An async truth test to apply to each item
  22. * in the collections in series.
  23. * The iteratee should complete with a boolean `result` value.
  24. * Invoked with (item, callback).
  25. * @param {Function} [callback] - A callback which is called as soon as any
  26. * iteratee returns `true`, or after all the iteratee functions have finished.
  27. * Result will be either `true` or `false` depending on the values of the async
  28. * tests. Invoked with (err, result).
  29. */
  30. exports.default = (0, _doLimit2.default)(_someLimit2.default, 1);
  31. module.exports = exports['default'];