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