0.5.0 • Published 3 years ago
@himynameisdave/utils.is-truthy v0.5.0
Test if a given element is truthy (by casting input to a boolean).
Examples
import isTruthy from '@himynameisdave/utils.is-truthy';
isTruthy(true); // true
isTruthy(false); // false
isTruthy(1); // true
isTruthy(0); // false
isTruthy('foo'); // true
isTruthy(''); // false
isTruthy([1,2,3]); // true