Rest
...fns: ((...args) => boolean)[]functions to combine
a function that returns true if exactly one of the input functions returns true
Rest
...args: Argsconst isEven = (n: number) => n % 2 === 0
const isPositive = (n: number) => n > 0
const isPositiveXorEven = xor(isEven, isPositive)
isPositiveXorEven(2) // returns false
isPositiveXorEven(3) // returns true
isPositiveXorEven(4) // returns false
Generated using TypeDoc
XOR operator for functions.