MCPcopy Index your code
hub / github.com/stemkoski/stemkoski.github.com / xor

Function xor

MathBox/mathbox-bundle.js:40165–40178  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

40163 * // => [1, 4, 5]
40164 */
40165 function xor() {
40166 var index = -1,
40167 length = arguments.length;
40168
40169 while (++index < length) {
40170 var array = arguments[index];
40171 if (isArray(array) || isArguments(array)) {
40172 var result = result
40173 ? baseUniq(baseDifference(result, array).concat(baseDifference(array, result)))
40174 : array;
40175 }
40176 }
40177 return result || [];
40178 }
40179
40180 /**
40181 * Creates an array of grouped elements, the first of which contains the first

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected