function isFunction
Usage in Deno
import { isFunction } from "node:util";
isFunction(object: unknown): boolean
Deprecated
Since v4.0.0 - Use typeof value === 'function'
instead.
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