parameter:参数验证工具

时间:2021-05-24 03:14:04
【文件属性】:
文件名称:parameter:参数验证工具
文件大小:18KB
文件格式:ZIP
更新时间:2021-05-24 03:14:04
JavaScript 范围 参数验证工具。 安装 $ npm install parameter --save 用法 原料药 Parameter类别 constructor([options]) -新的类Parameter实例 options.translate翻译功能 options.validateRoot配置是否验证传入的值必须是一个对象,默认为false 。 options.convert将原始参数转换为特定类型,默认为false 。 options.widelyUndefined -转换空字符串( '' ),NaN,则空为undefined,这个选项可以让rule.required更强大,默认为false 。 这可能会更改原始的输入参数。 validate(rule, value) -验证value符合rule 。 如果违反规则,则返回错误数组。 addRule(type, check) -
【文件预览】:
parameter-master
----benchmark.js(7KB)
----AUTHORS(281B)
----LICENSE.txt(1KB)
----example.js(2KB)
----.travis.yml(306B)
----test()
--------index.test.js(33KB)
----README.md(8KB)
----History.md(5KB)
----.gitignore(109B)
----index.js(14KB)
----package.json(1KB)

网友评论