if ( "Function" !== typeof String.prototype.strim ) String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g, ''); }
function isWhat ( x ) { return (""+x.constructor).split("(")[0].split("function")[1].trim () ; // or your clever RegEx here ... } function isObject ( x ) { return isWhat(x) === "Object" ; } function isArray ( x ) { return isWhat(x) === "Array" ; } // and so on ... for other types IMHO this might be one of the alternatives, also very strict and robust ... --DBJ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---