mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 10:57:49 +00:00
Use native filter instead of custom one where possible (#4116)
This commit is contained in:
committed by
John-David Dalton
parent
aa1d7d870d
commit
238e763aa1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user