【文件属性】:
文件名称:interval:验证值是否存在于指定的时间间隔内
文件大小:8KB
文件格式:ZIP
更新时间:2021-06-23 16:44:47
JavaScript
间隔
验证值是否存在于指定的时间间隔内。
安装
$ npm install validate.io-interval
要在浏览器中使用,请使用 。
用法
var onInterval = require ( 'validate.io-interval' ) ;
onInterval(值,下限,上限)
验证value存在于指定的区间[lower, upper] ,其中lower是区间下限(含), upper是区间上限(含)。
var value = 5 ,
lower = 0 ,
upper = 10 ;
var bool = onInterval ( value , lower , upper ) ;
// returns true
注意:所有arguments必须是numeric 。 如果提供非数字参数,则该方法返回false 。
例子
console . log (
【文件预览】:
interval-master
----.gitignore(711B)
----README.md(3KB)
----test()
--------test.js(1KB)
----examples()
--------index.js(225B)
----LICENSE(1KB)
----.gitattributes(12B)
----.jshintrc(1KB)
----package.json(1KB)
----.jshintignore(118B)
----TODO.md(12B)
----.npmignore(498B)
----.travis.yml(73B)
----.editorconfig(169B)
----Makefile(2KB)
----lib()
--------index.js(986B)