isFunction es-toolkit
Checks if a value is a function.
Usage
isFunction(value)
Use isFunction when you want to check if a value is a function. Can detect all types of functions including regular functions, async functions, generator functions, and constructor functions.
Also detects built-in JavaScript functions and classes:
Distinguishes from non-function values:
Useful for callback function validation or dynamic function invocation:
Parameters
valueunknownrequired
The value to check if it's a function.
Returns
Returns true if the value is a function, false otherwise.
Source: es-toolkit
Re-exported verbatim from es-toolkit. Implementation, edge cases, and performance behavior are owned upstream. This page mirrors the documentation at the pinned version; the linked source is authoritative.