Permalink
Browse files

added element type

  • Loading branch information...
1 parent 1f1ea85 commit 57e68d72aec33de273cf602d266b081c6e9ef49b @ianstormtaylor ianstormtaylor committed Feb 12, 2013
Showing with 2 additions and 0 deletions.
  1. +1 −0 index.js
  2. +1 −0 test/type.js
View
@@ -25,6 +25,7 @@ module.exports = function(val){
if (val === null) return 'null';
if (val === undefined) return 'undefined';
+ if (val && val.nodeType === 1) return 'element';
if (val === Object(val)) return 'object';
return typeof val;
View
@@ -26,3 +26,4 @@ assert('regexp', /asdf/);
assert('regexp', new RegExp('weee'));
assert('function', function(){});
assert('arguments', (function(){ return arguments })());
+assert('element', document.createElement('div'));

0 comments on commit 57e68d7

Please sign in to comment.