source: imaps-frontend/node_modules/lodash-es/union.js@ d565449

main
Last change on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 747 bytes
Line 
1import baseFlatten from './_baseFlatten.js';
2import baseRest from './_baseRest.js';
3import baseUniq from './_baseUniq.js';
4import isArrayLikeObject from './isArrayLikeObject.js';
5
6/**
7 * Creates an array of unique values, in order, from all given arrays using
8 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
9 * for equality comparisons.
10 *
11 * @static
12 * @memberOf _
13 * @since 0.1.0
14 * @category Array
15 * @param {...Array} [arrays] The arrays to inspect.
16 * @returns {Array} Returns the new array of combined values.
17 * @example
18 *
19 * _.union([2], [1, 2]);
20 * // => [2, 1]
21 */
22var union = baseRest(function(arrays) {
23 return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
24});
25
26export default union;
Note: See TracBrowser for help on using the repository browser.