Comparing version 0.0.4-dev to 0.0.5-dev
@@ -35,5 +35,6 @@ 'use strict' | ||
!validate.number[rule] && | ||
!validate.array[rule] && | ||
!validate.object[rule] && | ||
!validate.function[rule] | ||
) { | ||
) { | ||
return __unknownRule(value, rule) | ||
@@ -58,2 +59,3 @@ } | ||
// object cases | ||
case 'isSet': | ||
case 'isObject': | ||
@@ -68,5 +70,9 @@ case 'isArray': | ||
break | ||
// array cases | ||
case 'isIn': | ||
_match = validate.array[rule](value, _compare) | ||
break | ||
// function cases | ||
case 'isFunction': | ||
// case 'returnPromise': | ||
// case 'returnPromise': | ||
_match = _compare === validate.function[rule](value) | ||
@@ -73,0 +79,0 @@ break |
@@ -6,5 +6,6 @@ 'use strict' | ||
number: require('./number'), | ||
object: require('./object') | ||
object: require('./object'), | ||
array: require('./array') | ||
} | ||
module.exports = validate |
@@ -6,2 +6,5 @@ 'use strict' | ||
const object = { | ||
isSet: function (value) { | ||
return value !== null && value !== undefined | ||
}, | ||
isObject: function (value) { | ||
@@ -8,0 +11,0 @@ return value && typeof value === 'object' |
{ | ||
"name": "checkv", | ||
"version": "0.0.4-dev", | ||
"description": "validator checker", | ||
"version": "0.0.5-dev", | ||
"description": "javascript idiomatic validator", | ||
"main": "main.js", | ||
@@ -34,4 +34,4 @@ "dependencies": { | ||
], | ||
"author": "Simone Sanfratello <simone.sanfra@gmail.com>", | ||
"author": "Simone Sanfratello <simone@braceslab.com>", | ||
"license": "MIT" | ||
} |
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
7307
10
228