Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRebecca Turner <turner@mikomi.org>2015-01-26 00:26:53 +0300
committerRebecca Turner <me@re-becca.org>2015-06-26 03:26:40 +0300
commit401540b4190a5ade00b4d6e55448bc1ad407a2be (patch)
tree7cd330f7935f074662ae9ea988549512dc50261a /node_modules/lodash.union/index.js
parent7d0078eb081441c72153bf346aa00b437f2ecc0f (diff)
lodash.union@3.1.0
Diffstat (limited to 'node_modules/lodash.union/index.js')
-rw-r--r--node_modules/lodash.union/index.js35
1 files changed, 35 insertions, 0 deletions
diff --git a/node_modules/lodash.union/index.js b/node_modules/lodash.union/index.js
new file mode 100644
index 000000000..b26b28c89
--- /dev/null
+++ b/node_modules/lodash.union/index.js
@@ -0,0 +1,35 @@
+/**
+ * lodash 3.1.0 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.2 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+var baseFlatten = require('lodash._baseflatten'),
+ baseUniq = require('lodash._baseuniq'),
+ restParam = require('lodash.restparam');
+
+/**
+ * Creates an array of unique values, in order, of the provided arrays using
+ * `SameValueZero` for equality comparisons.
+ *
+ * **Note:** [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero)
+ * comparisons are like strict equality comparisons, e.g. `===`, except that
+ * `NaN` matches `NaN`.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @returns {Array} Returns the new array of combined values.
+ * @example
+ *
+ * _.union([1, 2], [4, 2], [2, 1]);
+ * // => [1, 2, 4]
+ */
+var union = restParam(function(arrays) {
+ return baseUniq(baseFlatten(arrays, false, true));
+});
+
+module.exports = union;