2009/8/4 DBJDBJ <[email protected]>:
> Is this not the simplest working solution ?
>
> // GPL (c) 2009 by DBJ.ORG
> function isFunction(x) {
> switch (typeof x) {
> case "function" : return true ;
> case "object" : return (x + "").match(/
> function/) !== null ;
> default : return false ;
> }
> }
>
var a = {
"foo": "function",
"toString": function() { return this.foo }
};
alert(isFunction(a));
--
Nick Fitzsimons
http://www.nickfitz.co.uk/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---