Returns true
if the given object
is a Function
. Otherwise, returnsfalse
.
const util = require('util');
function Foo() {}
const Bar = () => {};
util.isFunction({});
// Returns: false
util.isFunction(Foo);
// Returns: true
util.isFunction(Bar);
// Returns: true
Since v4.0.0 - Use typeof value === 'function'
instead.
Generated using TypeDoc
Returns
true
if the givenobject
is aFunction
. Otherwise, returnsfalse
.Deprecated
Since v4.0.0 - Use
typeof value === 'function'
instead.