1.2 KiB
Executable File
1.2 KiB
Executable File
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