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';
* _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
* // => [{ 'x': 1 }, { 'x': 2 }]
*/
const unionBy = (...arrays) => {
function unionBy(...arrays) {
let iteratee = last(arrays);
if (isArrayLikeObject(iteratee)) {
iteratee = undefined;
}
return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), baseIteratee(iteratee, 2));
};
}
export default unionBy;