MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / xor

Function xor

lib/web/jshint.js:7277–7290  ·  view source on GitHub ↗

* Creates an array that is the [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) * of the provided arrays. * * @static * @memberOf _ * @category Array * @param {...Array} [arrays] The arrays to inspect. * @returns {Array} Returns the new ar

()

Source from the content-addressed store, hash-verified

7275 * // => [1, 4]
7276 */
7277 function xor() {
7278 var index = -1,
7279 length = arguments.length;
7280
7281 while (++index < length) {
7282 var array = arguments[index];
7283 if (isArray(array) || isArguments(array)) {
7284 var result = result
7285 ? baseDifference(result, array).concat(baseDifference(array, result))
7286 : array;
7287 }
7288 }
7289 return result ? baseUniq(result) : [];
7290 }
7291
7292 /**
7293 * Creates an array of grouped elements, the first of which contains the first

Callers

nothing calls this directly

Calls 4

isArgumentsFunction · 0.85
baseDifferenceFunction · 0.85
baseUniqFunction · 0.85
isArrayFunction · 0.70

Tested by

no test coverage detected