I am not that confident as Andrea, but bellow might be a "definitive" solution too ;o)
function isFunction (x) { switch(typeof x) { case "function" : return true ; case "object" : if (( "function" !== typeof x.toString ) && ( "function" !== typeof x.valueOf )) return (x + "").match(/function/) !== null ; else return Object.prototype.toString.call (x) === "[object Function]" ; break ; default : return false ; } } var breaker = {valueOf:function(){return "[function]"},toString:null}; isFunction(breaker) /* false */ With IMHO less obfuscations ... --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---