• Returns whether the given value is nil or can be converted to false

    Parameters

    • Optionalvalue:
          | null
          | string
          | number
          | boolean
          | (() => boolean)

      the source value to check

    Returns boolean

    whether the given value is nil or can be converted to false

    isNotTrue(false);    // true
    isNotTrue(undefined); // true
    isNotTrue(null); // true
    isNotTrue('no'); // true
    isNotTrue('foobar'); // true
    isNotTrue(() => false); // true