isFunctionLike
Test if a value looks like a function.
isFunctionLike(obj)
Return true
if func
is a function, or implements
@@can.new
or @@can.apply
; false
otherwise.
canReflect.isFunctionLike(function() {}); // -> true
canReflect.isFunctionLike({}); // -> false
canReflect.isFunctionLike({ [canSymbol.for("can.apply")]: function() {} }); // -> true
Parameters
- obj
{*}
:maybe a function
Returns
{Boolean}
: