type-of-is
Advanced tools
Comparing version 3.2.0 to 3.2.1
17
index.js
@@ -37,8 +37,17 @@ (function (factory) { | ||
return function (obj) { | ||
// For now work around this bug in PhantomJS | ||
// https://github.com/ariya/phantomjs/issues/11722 | ||
if (obj === null) { | ||
return 'null'; | ||
} else if (obj === undefined) { | ||
return 'undefined'; | ||
} | ||
// [object Blah] -> Blah | ||
var stype = _toString.call(obj).slice(8, -1); | ||
if ((obj === null) || (obj === undefined)) { | ||
return stype.toLowerCase(); | ||
} | ||
// Temporarily elided see commented on line 37 above | ||
// if ((obj === null) || (obj === undefined)) { | ||
// return stype.toLowerCase(); | ||
// } | ||
@@ -105,2 +114,2 @@ var ctype = of(obj); | ||
})); | ||
})); |
{ | ||
"name": "type-of-is", | ||
"version": "3.2.0", | ||
"version": "3.2.1", | ||
"description": "Determine and test types using constructor or {}.toString", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -43,3 +43,3 @@ # Description | ||
3.2.0 | ||
3.2.1 | ||
@@ -218,4 +218,8 @@ | ||
# TODO | ||
check back on https://github.com/ariya/phantomjs/issues/11722 | ||
#Build status | ||
[![build status](https://secure.travis-ci.org/stephenhandley/type-of-is.png)](http://travis-ci.org/stephenhandley/type-of-is) |
21953
314
224