DBJ if somebody does not know a langua he cannot that language is
obfuscated. I guess for you ocaml is 100% obfuscated programming language,
right? Regexp are not obfuscation as in scope shortcut are not obfuscation
as well. If an host object has the word function in the middle your proposal
will fail. If a valueOf is an object with a valueOf, your typeof not
function will fail. I think this conversation is over in any case for this
ML, Ariel already clearly said his point. Regards

On Aug 5, 2009 11:55 PM, "DBJDBJ" <dbj...@gmail.com> wrote:


I am not that confident as Andrea, but bellow might be a "definitive"
solution too ;o)

function isFunction (x) { switch(typeof x) { case "f...
                          if (( "function" !== typeof x.toString ) &&
                              ( "function" !== typeof x.valueOf ))

return (x + "").match(/function/) !== null ; ...
var breaker = {valueOf:function(){return
"[function]"},toString:null};

isFunction(breaker)
/*
false
*/

With IMHO less obfuscations ...

--~--~---------~--~----~------------~-------~--~----~ You received this
message because you are subs...

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to