n4s:验证断言库

时间:2024-03-03 10:43:33
【文件属性】:

文件名称:n4s:验证断言库

文件大小:20KB

文件格式:ZIP

更新时间:2024-03-03 10:43:33

validation assertions enforce passable HTML

强制-n4s Enforce是一个验证声明库。 它提供了可以用来测试数据的规则。 默认情况下,当验证失败时,force会引发错误。 这些错误应由等验证测试框架捕获。 您可以根据需要扩展Enforce,也可以在应用程序中添加自定义验证规则。 import enforce from 'n4s' ; enforce ( 4 ) . isNumber ( ) ; // passes enforce ( 4 ) . isNumber ( ) . greaterThan ( 2 ) ; // passes enforce ( 4 ) . lessThan ( 2 ) // throws an error, will not carry on to the next rule . greaterThan ( 3 ) ; 安装 npm i n4s 非投掷验证 此功能代替了不再受支持的确保导


【文件预览】:
n4s-gh-pages
----ensure.md(1KB)
----template.md(1KB)
----.nojekyll(0B)
----custom.md(2KB)
----_sidebar.md(200B)
----README.md(1KB)
----business_rules.md(2KB)
----external.md(1KB)
----compound.md(5KB)
----index.html(977B)
----docs()
--------ensure.md(1KB)
--------.nojekyll(0B)
--------custom.md(1KB)
--------_sidebar.md(175B)
--------README.md(983B)
--------business_rules.md(2KB)
--------index.html(977B)
--------rules.md(17KB)
----rules.md(22KB)

网友评论