Function isFunction

Determines if a value is a function.

AnyFn

isFunction(() => {}); // => true
isFunction({}); // => false
  • Parameters

    • fn: unknown

      The value to check.

    Returns fn is AnyFn

    True if the value is a function, false otherwise.