hasNumericValue
hasNumericValue(x)
Test whether a value is an numeric value. In case of a string, true is returned if the string contains a numeric value.
Try it yourself:
$1 | hasNumericValue(2)
| |
$2 | hasNumericValue("2")
| |
$3 | isNumeric("2")
| |
$4 | hasNumericValue(0)
| |
$5 | hasNumericValue(bignumber(500))
| |
$6 | hasNumericValue(fraction(0.125))
| |
$7 | hasNumericValue(2 + 3i)
| |
$8 | hasNumericValue([2.3, "foo", false])
|