@petsel/es-type-detection - v1.0.0
    Preparing search index...

    Function isGenericFunction

    • Detects whether the passed value is a generic (unspecific/non-specific) function ...

      • either a good old ES3 function,
      • or a non-async arrow function expression.
      • or either a non-async and non-generator concise method (shorthand function definition).

      Thus, the following specific (non-generic) function types are excluded ...

      • class constructor functions,
      • any generator function,
      • any async function variant,
      • extended Function types,
      • built-in constructor functions,
      • Web Api constructor functions.

      Parameters

      • Optionalvalue: any

        An optionally passed value of any type.

      Returns value is NonAsyncArrow | ES3Function

      A boolean value which indicates whether the tested value is either a good old ES3 function or a non-async arrow function expression.