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