@lou.codes/predicates
Version:
🧐 Predicate util functions
18 lines (17 loc) • 467 B
TypeScript
/**
* `typeof` "function" alias.
*
* @category Objects
* @example
* ```typescript
* isFunction(() => {}); // true
* isFunction(function() {}); // true
* isFunction(function *() {}); // true
* isFunction(class {}); // true
* isFunction(null); // false
* ```
* @returns `true` if the given value is a function, `false` otherwise.
*/
export declare const isFunction: (
input: unknown,
) => input is import("@lou.codes/types").TypeOfDictionary["function"];