aecfcb65d31d288b3da34ee5bf0bb8e7965b34fa
[yaffs-website] / node_modules / uncss / node_modules / lodash / union.js
1 var baseFlatten = require('./internal/baseFlatten'),
2     baseUniq = require('./internal/baseUniq'),
3     rest = require('./rest');
4
5 /**
6  * Creates an array of unique values, in order, from all of the provided arrays
7  * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
8  * for equality comparisons.
9  *
10  * @static
11  * @memberOf _
12  * @category Array
13  * @param {...Array} [arrays] The arrays to inspect.
14  * @returns {Array} Returns the new array of combined values.
15  * @example
16  *
17  * _.union([2, 1], [4, 2], [1, 2]);
18  * // => [2, 1, 4]
19  */
20 var union = rest(function(arrays) {
21   return baseUniq(baseFlatten(arrays, false, true));
22 });
23
24 module.exports = union;