【文件属性】:
文件名称:positive:验证值是否为正数
文件大小:8KB
文件格式:ZIP
更新时间:2021-06-23 03:56:49
JavaScript
积极的
验证值是否为正数。
安装
$ npm install validate.io-positive
要在浏览器中使用,请使用 。
用法
var isPositive = require ( 'validate.io-positive' ) ;
isPositive(值)
验证value是否为正number 。
var value = Math . PI ;
var bool = isPositive ( value ) ;
// returns true
例子
var isPositive = require ( 'validate.io-positive' ) ;
console . log ( isPositive ( Math . PI ) ) ;
// returns true
console . log ( isPositive ( 0 ) ) ;
// ret
【文件预览】:
positive-master
----.jshintrc(1KB)
----.gitignore(711B)
----package.json(1KB)
----Makefile(2KB)
----.travis.yml(73B)
----LICENSE(1KB)
----examples()
--------index.js(211B)
----.jshintignore(118B)
----README.md(3KB)
----lib()
--------index.js(701B)
----TODO.md(12B)
----.npmignore(498B)
----.gitattributes(12B)
----test()
--------test.js(954B)
----.editorconfig(169B)