reject.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. 'use strict';
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. var _reject = require('./internal/reject');
  6. var _reject2 = _interopRequireDefault(_reject);
  7. var _doParallel = require('./internal/doParallel');
  8. var _doParallel2 = _interopRequireDefault(_doParallel);
  9. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  10. /**
  11. * The opposite of [`filter`]{@link module:Collections.filter}. Removes values that pass an `async` truth test.
  12. *
  13. * @name reject
  14. * @static
  15. * @memberOf module:Collections
  16. * @method
  17. * @see [async.filter]{@link module:Collections.filter}
  18. * @category Collection
  19. * @param {Array|Iterable|Object} coll - A collection to iterate over.
  20. * @param {Function} iteratee - An async truth test to apply to each item in
  21. * `coll`.
  22. * The should complete with a boolean value as its `result`.
  23. * Invoked with (item, callback).
  24. * @param {Function} [callback] - A callback which is called after all the
  25. * `iteratee` functions have finished. Invoked with (err, results).
  26. * @example
  27. *
  28. * async.reject(['file1','file2','file3'], function(filePath, callback) {
  29. * fs.access(filePath, function(err) {
  30. * callback(null, !err)
  31. * });
  32. * }, function(err, results) {
  33. * // results now equals an array of missing files
  34. * createFiles(results);
  35. * });
  36. */
  37. exports.default = (0, _doParallel2.default)(_reject2.default);
  38. module.exports = exports['default'];