isFunction
Returns true
if the given object
is a Function
. Otherwise, returns false
.
const util = require('node:util');
function Foo() {}
const Bar = () => {};
util.isFunction({});
// Returns: false
util.isFunction(Foo);
// Returns: true
util.isFunction(Bar);
// Returns: true
Content copied to clipboard
Since
v0.11.5