Checks if a value is Truthy
value
The opposite of isFalsy
const result = isTruthy(1);console.log(result); // true
const result = isTruthy(" ");console.log(result); // true
const result = isTruthy(0);console.log(result); // false
const result = isTruthy(null);console.log(result); // false
true if value is a Truthy, otherwise false
true
false
the value to check
Generated using TypeDoc
Checks if a
valueis TruthyThe opposite of isFalsy
Example
Example
Example
Example
Returns
trueifvalueis a Truthy, otherwisefalse