Comparing version 1.0.3 to 1.0.4
@@ -12,4 +12,4 @@ module.exports = function(val,type){ | ||
if((t.length===1&&t[0]==='')||(t.some((i)=>i==='any'))) return true; | ||
if(t.some((i)=>i==='truthy')) return !!val; | ||
if(t.some((i)=>i==='falsy')) return !val; | ||
if(t.some((i)=>i==='truthy')&&!!val) return true; | ||
if(t.some((i)=>i==='falsy')&&!val) return true; | ||
if(typeof val==='undefined'&&t.some((i)=>i==='undefined')) return true; | ||
@@ -24,4 +24,4 @@ if(val===null&&t.some((i)=>i==='null')) return true; | ||
if(type.test('any')||type.test('')) return true; | ||
if(type.test('truthy')&&!!val) return !!val; | ||
if(type.test('falsy')&&!val) return !val; | ||
if(type.test('truthy')&&!!val) return true; | ||
if(type.test('falsy')&&!val) return true; | ||
if(type.test('undefined')&&typeof val==='undefined') return true; | ||
@@ -28,0 +28,0 @@ if(type.test('null')&&val===null) return true; |
{ | ||
"name": "of-type", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Check if the given value is of the particular type or types.", | ||
@@ -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
8012
5
34