Comparing version 1.0.4 to 1.0.5
11
index.js
@@ -444,2 +444,13 @@ /** | ||
/** | ||
* Test if 'value' is an object with no properties. Note: Arrays are objects. | ||
* Alias: nonEmptyObj | ||
* @param {Any} value to test. | ||
* @return {Boolean} true if 'value' is an object, false otherwise. | ||
*/ | ||
is.emptyObject = function(value) { | ||
return '[object Object]' === toString.call(value) && Object.keys(value).length === 0; | ||
}; | ||
is.emptyObj = is.emptyObject; | ||
/** | ||
* Test if 'value' is a non-empty string. | ||
@@ -446,0 +457,0 @@ * Alias: nonEmptyStr |
{ | ||
"name": "is2", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"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", |
@@ -72,2 +72,3 @@ is2 | ||
* is.nonEmptyObject(val) - is.nonEmptyObj | ||
* is.emptyObject(val) - is.emptyObj | ||
* is.nonEmptyString(val) - is.nonEmptyStr | ||
@@ -74,0 +75,0 @@ |
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
115726
2448
163