parseNumberFromString()
ts
function parseNumberFromString(data): ParseResult<number>
Parses a number from a stringified number. The result is always a number
, and never NaN
or ±Infinity
. Strings that describe numbers (without any other characters involved) yield results. Numbers that can be represented in binary, octal, decimal, hexadecimal, and scientific format are supported.
Parameters
Parameter | Type | Description |
---|---|---|
data | unknown |
Returns
ParseResult
<number
>