check-data
Advanced tools
Comparing version 1.3.0 to 1.3.1
12
index.js
@@ -360,13 +360,21 @@ "use strict"; | ||
// 自定义方法 | ||
// 自定义构造方法 | ||
else { | ||
// 空值过滤 | ||
let result = options.call(input, output) | ||
if (typeof result === 'object') { | ||
let start = true | ||
for (let key in result) { | ||
if (!result[key]) { | ||
if (result[key]) { | ||
start = false | ||
} else { | ||
delete result[key] | ||
} | ||
} | ||
if (start) { | ||
return | ||
} | ||
} | ||
data = result | ||
@@ -373,0 +381,0 @@ |
{ | ||
"name": "check-data", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "JS数据验证器", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -74,3 +74,3 @@ let Verify = require('../index') | ||
return { | ||
"a": 565, | ||
"a": 666, | ||
"b": undefined, | ||
@@ -77,0 +77,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
20296
513