mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 18:07:49 +00:00
Continue to use more ES2015.
This commit is contained in:
4
xorBy.js
4
xorBy.js
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user