Comparing version 1.0.5 to 1.0.6
15
index.js
@@ -1262,1 +1262,16 @@ /** | ||
is.enumerator = function(val, ary){ | ||
var value = false; | ||
if (!is.defined(val) || !is.defined(ary) || !is.arrayLike(ary)) | ||
return value; | ||
for (var i = 0, len = ary.length; i < len; i++) { | ||
if (is.equal(val, ary[i])) { | ||
value = true; | ||
break; | ||
} | ||
} | ||
return value; | ||
}; | ||
is.enum = is.inArray = is.enumerator; |
{ | ||
"name": "is2", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "A type checking library where each exported function returns either true or false and does not throw. Also added tests.", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -62,2 +62,3 @@ is2 | ||
* is.type(val, type) - is.a | ||
* is.enumerator(val, array) - is.enum, is.inArray | ||
@@ -64,0 +65,0 @@ Object State: |
Sorry, the diff of this file is too big to display
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
117030
2480
164