Simplify the logic in $.type, thanks to jdalton for the suggesiton in 5d2be7e299.

This commit is contained in:
John Resig 2010-08-27 07:03:30 -07:00
parent 5d2be7e299
commit 7f18d29287

View File

@ -446,10 +446,8 @@ jQuery.extend({
},
type: function( obj ) {
return obj === null ?
"null" :
obj === undefined ?
"undefined" :
return obj == null ?
String( obj ) :
toString.call(obj).slice(8, -1).toLowerCase();
},