Validates that the provided value is truthy (not null or undefined). Returns boolean based on truthiness.
boolean
The value to validate.
True if the value is not null or undefined, False if otherwise.
True
False
const input = getInput();isValid(input); // True if input is valid. Copy
const input = getInput();isValid(input); // True if input is valid.
Validates that the provided value is truthy (not null or undefined). Returns
booleanbased on truthiness.