filterSeries.js

  1. import filterLimit from './filterLimit';
  2. import doLimit from './internal/doLimit';
  3. /**
  4. * The same as [`filter`]{@link module:Collections.filter} but runs only a single async operation at a time.
  5. *
  6. * @name filterSeries
  7. * @static
  8. * @memberOf module:Collections
  9. * @method
  10. * @see [async.filter]{@link module:Collections.filter}
  11. * @alias selectSeries
  12. * @category Collection
  13. * @param {Array|Iterable|Object} coll - A collection to iterate over.
  14. * @param {Function} iteratee - A truth test to apply to each item in `coll`.
  15. * The `iteratee` is passed a `callback(err, truthValue)`, which must be called
  16. * with a boolean argument once it has completed. Invoked with (item, callback).
  17. * @param {Function} [callback] - A callback which is called after all the
  18. * `iteratee` functions have finished. Invoked with (err, results)
  19. */
  20. export default doLimit(filterLimit, 1);