git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5d2be7e
)
Simplify the logic in $.type, thanks to jdalton for the suggesiton in 5d2be7e299131a3...
author
John Resig
<jeresig@gmail.com>
Fri, 27 Aug 2010 14:03:30 +0000
(07:03 -0700)
committer
John Resig
<jeresig@gmail.com>
Fri, 27 Aug 2010 14:03:30 +0000
(07:03 -0700)
src/core.js
patch
|
blob
|
history
diff --git
a/src/core.js
b/src/core.js
index
81a920b
..
d4a0e61
100644
(file)
--- a/
src/core.js
+++ b/
src/core.js
@@
-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();
},