UNPKG
iz
Version:
latest (3.0.0)
3.0.0
2.3.1
2.3.0
2.2.4
2.2.3
2.2.2
2.2.1
2.1.4
2.1.3
2.1.2
2.1.1
2.1.0
2.0.1
2.0.0
0.7.1
0.7.0
0.6.0
0.5.2
0.5.1
0.5.0
0.4.1
0.4.0
0.3.0
0.2.0
0.1.0
0.0.4
0.0.3
0.0.2
0.0.1
Validation for node and the web.
github.com/parris/iz
parris/iz
iz
/
lib
/
basicValidators
/
number.js
8 lines
(7 loc)
•
177 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
'use strict'
;
module
.
exports
=
function
izNumber
(
val
) {
if
((
typeof
val ===
'string'
||
typeof
val ===
'number'
) && !
isNaN
(val %
1
)) {
return
true
; }
return
false
; };