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:
809 bytes
|
Rev | Line | |
---|
[d565449] | 1 | import arrayFilter from './_arrayFilter.js';
|
---|
| 2 | import baseRest from './_baseRest.js';
|
---|
| 3 | import baseXor from './_baseXor.js';
|
---|
| 4 | import isArrayLikeObject from './isArrayLikeObject.js';
|
---|
| 5 |
|
---|
| 6 | /**
|
---|
| 7 | * Creates an array of unique values that is the
|
---|
| 8 | * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
|
---|
| 9 | * of the given arrays. The order of result values is determined by the order
|
---|
| 10 | * they occur in the arrays.
|
---|
| 11 | *
|
---|
| 12 | * @static
|
---|
| 13 | * @memberOf _
|
---|
| 14 | * @since 2.4.0
|
---|
| 15 | * @category Array
|
---|
| 16 | * @param {...Array} [arrays] The arrays to inspect.
|
---|
| 17 | * @returns {Array} Returns the new array of filtered values.
|
---|
| 18 | * @see _.difference, _.without
|
---|
| 19 | * @example
|
---|
| 20 | *
|
---|
| 21 | * _.xor([2, 1], [2, 3]);
|
---|
| 22 | * // => [1, 3]
|
---|
| 23 | */
|
---|
| 24 | var xor = baseRest(function(arrays) {
|
---|
| 25 | return baseXor(arrayFilter(arrays, isArrayLikeObject));
|
---|
| 26 | });
|
---|
| 27 |
|
---|
| 28 | export default xor;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.