Skip to main content
Version: 1.3.0

isFunction

Using

This function determines whether the given value is a real function.

  • Returns true for standard functions, arrow functions, async, generator, class constructors, built-ins, and Function instances.
  • Returns false for all non-function values, including objects with .call, arrays, primitives, and browser-specific quirks like document.all.

Arguments

ArgumentTypeDescriptionExample
valueunknownCan be any type"text"
2
undefined

Returns

booleantrue if value is a function, false otherwise

Examples

isFunction(() => {});
// true

isFunction(async function () {});
// true

isFunction(class {});
// true

isFunction({ call: () => {} });
// false

isFunction(null);
// false

isFunction(() => () => {});
// true

isFunction('function');
// false

Resources

📦 Since:1.3.0
📦 Last updated:1.3.0
📦 Available in:1.3.0