isNullish.js.flow 216 Bytes
Newer Older
1 2 3 4 5 6 7 8
// @flow strict

/**
 * Returns true if a value is null, undefined, or NaN.
 */
export default function isNullish(value: mixed): boolean %checks {
  return value === null || value === undefined || value !== value;
}