and
a → b → a | b
Added in v0.1.0
Returns the first argument if it is falsy, otherwise the second argument. Acts as the boolean and statement if both inputs are Booleans.
R.and(true, true); //=> trueR.and(true, false); //=> falseR.and(false, true); //=> falseR.and(false, false); //=> false
isEmpty
a → Boolean
Added in v0.1.0
Returns true if the given value is its type’s empty value; false otherwise.
See also empty, isNotEmpty.
R.isEmpty([1, 2, 3]); //=> falseR.isEmpty([]); //=> trueR.isEmpty(''); //=> trueR.isEmpty(null); //=> falseR.isEmpty({}); //=> trueR.isEmpty({length: 0}); //=> falseR.isEmpty(Uint8Array.from('')); //=> true
not
* → Boolean
Parameters
- aany value
Returns Boolean the logical inverse of passed argument.
Added in v0.1.0
A function that returns the ! of its argument. It will return true when passed false-y value, and false when passed a truth-y one.
See also complement.
R.not(true); //=> falseR.not(false); //=> trueR.not(0); //=> trueR.not(1); //=> false
or
a → b → a | b
Added in v0.1.0
Returns the first argument if it is truthy, otherwise the second argument. Acts as the boolean or statement if both inputs are Booleans.
R.or(true, true); //=> trueR.or(true, false); //=> trueR.or(false, true); //=> trueR.or(false, false); //=> false
