function isFunction
isFunction(object: unknown): boolean
Deprecated
Returns true
if the given object
is a Function
. Otherwise, returns false
.
import util from 'node:util';
function Foo() {}
const Bar = () => {};
util.isFunction({});
// Returns: false
util.isFunction(Foo);
// Returns: true
util.isFunction(Bar);
// Returns: true
boolean