Apply arrow function transform.

This commit is contained in:
John-David Dalton
2017-01-06 15:41:39 -08:00
parent d461c87979
commit 7167d7e09f
108 changed files with 172 additions and 271 deletions

View File

@@ -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;