Determines if the specified functionToCheck is a function.
Parameters:
Name | Type | Description |
---|---|---|
functionToCheck | * | The item to be tested. |
- Since
- 1.0.0
- Source
Returns:
Returns true if the specified functionToCheck is a function. Returns false otherwise.
- Type:
- boolean
Example
import { isFunction } from "@gravityforms/utils";
function Example() {
const isFunction = isFunction( fn1 );
}
function fn1() {
return 1;
}