2016-01-14 16:02:59 +00:00
|
|
|
import _reject from 'lodash/reject';
|
2015-08-05 11:29:30 +00:00
|
|
|
import wrap from './wrap';
|
2015-07-31 16:16:19 +00:00
|
|
|
|
2015-08-05 11:29:30 +00:00
|
|
|
function reject(predicate, collection) {
|
2016-06-07 03:51:11 +00:00
|
|
|
const result = _reject(collection, predicate);
|
|
|
|
const equal = collection.length === result.length;
|
|
|
|
|
|
|
|
return equal ?
|
|
|
|
collection :
|
|
|
|
result;
|
2015-08-05 11:29:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export default wrap(reject);
|