* 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
()
| 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 |
nothing calls this directly
no test coverage detected