_.isNil(value)

sourcenpm package

Checks if value is null or undefined.

Since

4.0.0

Arguments

  • value (*): The value to check.

Returns

(boolean): Returns true if value is nullish, else false.

Example

  1. _.isNil(null);
    // => true
    _.isNil(void 0);
    // => true
    _.isNil(NaN);
    // => false