check-data
Advanced tools
Comparing version 1.6.4 to 1.6.5
10
index.js
@@ -14,5 +14,6 @@ "use strict" | ||
* @param {*} options 验证表达式 | ||
* @param {*} handler 导出数据自定义处理方法 | ||
* @param {Object} handler 导出数据自定义处理方法 | ||
* @param {Function} callback 附加回调函数(用于全局参数注入) | ||
*/ | ||
function Validator(data, options, handler = {}) { | ||
function Validator(data, options, handler = {}, callback) { | ||
@@ -39,2 +40,7 @@ // 递归验证 | ||
// 附加回调函数 | ||
if (callback) { | ||
callback(output.data) | ||
} | ||
return output | ||
@@ -41,0 +47,0 @@ |
{ | ||
"name": "check-data", | ||
"version": "1.6.4", | ||
"version": "1.6.5", | ||
"description": "JS数据验证器", | ||
@@ -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
25674
634