1.2 KiB
1.2 KiB
is-number-like
var looksLikeNumber = isNumberLike(val)
Checks whether provided parameter looks like a number
- val (any) - the value to check
- returns (boolean) looksLikeNumber -
true
ifval
looks like a number,false
otherwise
const isNumberLike = require('is-number-like')
isNumberLike('2') // true
isNumberLike('a') // false