12345678910111213141516171819202122232425262728293031323334 |
- var baseFlatten = require('./_baseFlatten'),
- baseRest = require('./_baseRest'),
- baseUniq = require('./_baseUniq'),
- isArrayLikeObject = require('./isArrayLikeObject'),
- last = require('./last');
- var unionWith = baseRest(function(arrays) {
- var comparator = last(arrays);
- comparator = typeof comparator == 'function' ? comparator : undefined;
- return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);
- });
- module.exports = unionWith;
|