Continue to use more ES2015.

This commit is contained in:
John-David Dalton
2017-01-03 23:07:06 -08:00
parent 1a1e462f80
commit 0e24641cb8
7 changed files with 21 additions and 21 deletions

View File

@@ -27,12 +27,12 @@ import last from './last.js';
* _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
* // => [{ 'x': 2 }]
*/
const xorBy = (...arrays) => {
function xorBy(...arrays) {
let iteratee = last(arrays);
if (isArrayLikeObject(iteratee)) {
iteratee = undefined;
}
return baseXor(arrayFilter(arrays, isArrayLikeObject), baseIteratee(iteratee, 2));
};
}
export default xorBy;