main
Last change
on this file since d24f17c was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
710 bytes
|
Line | |
---|
1 | import _curry2 from "./internal/_curry2.js";
|
---|
2 | /**
|
---|
3 | * Exclusive disjunction logical operation.
|
---|
4 | * Returns `true` if one of the arguments is truthy and the other is falsy.
|
---|
5 | * Otherwise, it returns `false`.
|
---|
6 | *
|
---|
7 | * @func
|
---|
8 | * @memberOf R
|
---|
9 | * @since v0.27.1
|
---|
10 | * @category Logic
|
---|
11 | * @sig a -> b -> Boolean
|
---|
12 | * @param {Any} a
|
---|
13 | * @param {Any} b
|
---|
14 | * @return {Boolean} true if one of the arguments is truthy and the other is falsy
|
---|
15 | * @see R.or, R.and
|
---|
16 | * @example
|
---|
17 | *
|
---|
18 | * R.xor(true, true); //=> false
|
---|
19 | * R.xor(true, false); //=> true
|
---|
20 | * R.xor(false, true); //=> true
|
---|
21 | * R.xor(false, false); //=> false
|
---|
22 | */
|
---|
23 |
|
---|
24 | var xor =
|
---|
25 | /*#__PURE__*/
|
---|
26 | _curry2(function xor(a, b) {
|
---|
27 | return Boolean(!a ^ !b);
|
---|
28 | });
|
---|
29 |
|
---|
30 | export default xor; |
---|
Note:
See
TracBrowser
for help on using the repository browser.