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

    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 true

    isNotFalse(true);    // true
    isNotFalse(undefined); // true
    isNotFalse(null); // true
    isNotFalse('yes'); // true
    isNotFalse('foobar'); // true
    isNotFalse(() => true); // true