isNullish.mjs 175 Bytes
Newer Older
1 2 3 4 5 6
/**
 * Returns true if a value is null, undefined, or NaN.
 */
export default function isNullish(value) {
  return value === null || value === undefined || value !== value;
}