isPresent (source code)
- Curried: true
- Failsafe status: failsafe by default
The isPresent
function is a utility that checks if a value is present.
It combines checks for null and empty values. It is worth noting that we also
have an isNotPresent utility function that returns the complement of
isPresent
.
- The value to be checked for presence.
isPresent([]); // returns false
isPresent(null); // returns false
isPresent(""); // returns false
isPresent("Oliver"); // returns true