mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 02:17:48 +00:00
Apply arrow function transform.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import arrayFilter from './_arrayFilter.js';
|
||||
import baseRest from './_baseRest.js';
|
||||
import baseXor from './_baseXor.js';
|
||||
import isArrayLikeObject from './isArrayLikeObject.js';
|
||||
import last from './last.js';
|
||||
@@ -25,10 +24,10 @@ import last from './last.js';
|
||||
* _.xorWith(objects, others, _.isEqual);
|
||||
* // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
|
||||
*/
|
||||
var xorWith = baseRest(function(arrays) {
|
||||
var comparator = last(arrays);
|
||||
function xorWith(...arrays) {
|
||||
let comparator = last(arrays);
|
||||
comparator = typeof comparator == 'function' ? comparator : undefined;
|
||||
return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
|
||||
});
|
||||
}
|
||||
|
||||
export default xorWith;
|
||||
|
||||
Reference in New Issue
Block a user