Skip to main content

isFunction

function isFunction
Jump to headingisFunction(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

Parameters Jump to heading

Jump to headingobject: unknown

Return Type Jump to heading

boolean
Back to top