Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added element type

  • Loading branch information...
commit 57e68d72aec33de273cf602d266b081c6e9ef49b 1 parent 1f1ea85
@ianstormtaylor ianstormtaylor authored
Showing with 2 additions and 0 deletions.
  1. +1 −0  index.js
  2. +1 −0  test/type.js
View
1  index.js
@@ -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
1  test/type.js
@@ -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'));
Please sign in to comment.
Something went wrong with that request. Please try again.