Variable: isFunction
constisFunction:TypePredicate<unknown,Function>
Defined in: predicate/guards/index.ts:296
Type guard that checks if a value is a function.
Param
The value to check
Returns
True if value is a function
Example
import * as R from 'remeda'
import { isFunction } from 'receta/predicate'
const mixed: unknown[] = [() => {}, 42, function() {}, 'test']
R.filter(mixed, isFunction) // type: Function[]
See
- isObject - for object type guard
- isArray - for array type guard