Compruebe si la función JavaScript
variableToCheck instanceof Function
Greenhorizon75
variableToCheck instanceof Function
function isFunction(functionToCheck) {
return functionToCheck && {}.toString.call(functionToCheck) === '[object Function]';
}
if (typeof v === 'function') {
// do something
}