Comparing version 1.0.3 to 1.0.4
10
index.js
@@ -39,2 +39,3 @@ //Table taken from: http://www.ecma-international.org/ecma-262/6.0/ section 18.3 | ||
module.exports = function is(_val,_objType){ | ||
console.log(_val,_objType); | ||
var $return,toString; | ||
@@ -58,4 +59,11 @@ | ||
toString = (_val.toString ? _val.toString() : Object.prototype.toString.call(_val)).match(/\[object ([^\]]*)\]/); | ||
if(_val.toString){ | ||
toString = _val.toString().match(/\[object ([^\]]*)\]/); | ||
} | ||
if(!toString){ | ||
toString = Object.prototype.toString.call(_val).match(/\[object ([^\]]*)\]/); | ||
} | ||
if(!toString){ | ||
return $return; | ||
@@ -62,0 +70,0 @@ } |
{ | ||
"name": "arc-is", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Simple is() function for typechecking", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10275
205