Use native filter instead of custom one where possible (#4116)

This commit is contained in:
Luiz Américo
2018-12-11 13:26:35 -03:00
committed by John-David Dalton
parent aa1d7d870d
commit 238e763aa1
4 changed files with 4 additions and 9 deletions

View File

@@ -1,4 +1,3 @@
import filter from './filter.js'
import baseXor from './.internal/baseXor.js'
import isArrayLikeObject from './isArrayLikeObject.js'
import last from './last.js'
@@ -26,7 +25,7 @@ import last from './last.js'
function xorWith(...arrays) {
let comparator = last(arrays)
comparator = typeof comparator == 'function' ? comparator : undefined
return baseXor(filter(arrays, isArrayLikeObject), undefined, comparator)
return baseXor(arrays.filter(isArrayLikeObject), undefined, comparator)
}
export default xorWith