mazey
    Preparing search index...

    Function isNullish

    • Return whether a value is exactly undefined or null.

      Usage:

      import { isNullish } from "mazey";

      const ret1 = isNullish(undefined);
      const ret2 = isNullish(null);
      const ret3 = isNullish("abc");
      console.log(ret1, ret2, ret3);

      Output:

      true true false
      

      Other falsy values, including false, 0, NaN, and an empty string, return false.

      Parameters

      • val: any

        The value to verify.

      Returns boolean

      Whether the value is undefined or null.