namespace
logic_utils
Source: functions.
Methods
static
and(a, b) → any
Returns a && b. I.e. if a is truthy it returns b, otherwise it short
circuits and returns a
Parameters
| Name | Type | Optional | Description |
|---|---|---|---|
|
a |
any |
|
|
|
b |
any |
|
- Returns
-
any
static
not(a) → boolean
Returns logical NOT of a
Parameter
| Name | Type | Optional | Description |
|---|---|---|---|
|
a |
any |
|
- Returns
-
boolean
static
or(a, b) → any
Returns a || b. I.e. if a is truthy it short circuits and returns a,
otherwise it returns b
Parameters
| Name | Type | Optional | Description |
|---|---|---|---|
|
a |
any |
|
|
|
b |
any |
|
- Returns
-
any
static
xor(a, b) → boolean
Returns logical XOR of a and b. I.e. returns true if exactly one of a
and b are truthy, otherwise returns false
Parameters
| Name | Type | Optional | Description |
|---|---|---|---|
|
a |
any |
|
|
|
b |
any |
|
- Returns
-
boolean