GuardsFunction Guards
Check Function
Determines if a value is a callable function.
isFunction
Determines if a value is a callable function. Works for all function types including async functions, generators, and class constructors.
Import
import { isFunction } from 'toolbox-x/guards';Signature
function isFunction(value: unknown): value is GenericFnType Definitions
type GenericFn = (...args: any) => any;Examples
playground.ts
Notes
- Returns true for all callable values
- Includes async functions and generators
Last updated: Sun, May 31, 2026 05:02:11AM (UTC)
