isFunction
Validates if the supplied input is a function.
Signature
isFunction(input: any): boolean
Parameters
Name | Type | Optional | Description |
---|---|---|---|
input | any | No | Input to validate. |
Return value
Returns true
if the input is a function.
Example
import { isFunction } from "@tripetto/builder";
isFunction(() => {}); // Returns `true`