Skip to content

isTruthy

isTruthy(target)

Checks if a value is truthy (not false, 0, "", null, or undefined).

ts
isTruthy("hello"); // true
isTruthy(1); // true
isTruthy(false); // false
isTruthy(""); // false
ts
pipe("hello", isTruthy()); // true
pipe(false, isTruthy()); // false