Skip to content

Latest commit

 

History

History
22 lines (16 loc) · 658 Bytes

isPresent.md

File metadata and controls

22 lines (16 loc) · 658 Bytes

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.

Arguments

  • The value to be checked for presence.

Usage

isPresent([]); // returns false
isPresent(null); // returns false
isPresent(""); // returns false
isPresent("Oliver"); // returns true