reject.js 541 B

123456789101112131415161718192021
  1. 'use strict';
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = reject;
  6. var _filter = require('./filter');
  7. var _filter2 = _interopRequireDefault(_filter);
  8. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  9. function reject(eachfn, arr, iteratee, callback) {
  10. (0, _filter2.default)(eachfn, arr, function (value, cb) {
  11. iteratee(value, function (err, v) {
  12. cb(err, !v);
  13. });
  14. }, callback);
  15. }
  16. module.exports = exports['default'];