xor (Functional Programming) es-toolkit
Creates a function that returns values that appear in exactly one of two arrays. Use it with pipe.
Info
Usage
xor returns the symmetric difference of the piped array and secondArray, without duplicate values.
Parameters
secondArrayreadonly T[]required
The array to compare with the piped array.
Returns
A function that maps a readonly T[] to the symmetric difference.
Source: es-toolkit
Re-exported verbatim from es-toolkit. Implementation, edge cases, and performance behavior are owned upstream. This page mirrors the documentation at the pinned version; the linked source is authoritative.