check-data
Advanced tools
Comparing version 1.6.11 to 1.6.12
@@ -17,2 +17,6 @@ "use strict" | ||
and({ data, option, input }) { | ||
// 如果option为函数,应先执行函数,将函数转为数组 | ||
if (option instanceof Function) { | ||
option = option.call(input, data) | ||
} | ||
if (option instanceof Array) { | ||
@@ -24,4 +28,2 @@ for (let name of option) { | ||
} | ||
} else if (option instanceof Function) { | ||
option = option.call(input, data) | ||
} | ||
@@ -32,2 +34,6 @@ return { data } | ||
or({ data, option, input }) { | ||
// 如果option为函数,应先执行函数,将函数转为数组 | ||
if (option instanceof Function) { | ||
option = option.call(input, data) | ||
} | ||
if (option instanceof Array) { | ||
@@ -43,4 +49,2 @@ let status = true | ||
} | ||
} else if (option instanceof Function) { | ||
option = option.call(input, data) | ||
} | ||
@@ -47,0 +51,0 @@ return { data } |
{ | ||
"name": "check-data", | ||
"version": "1.6.11", | ||
"version": "1.6.12", | ||
"description": "JS数据验证器", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -260,3 +260,3 @@ ## Installation | ||
## and | ||
## and依赖验证 | ||
@@ -290,3 +290,3 @@ let { error, data } = Validator({ | ||
## or | ||
## or依赖验证 | ||
@@ -293,0 +293,0 @@ let { error, data } = Validator({ |
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
26602
634