safeAnyToNumber
Safely convert any value to a number.
Type definition
Fallback
Default fallback number is 0
.
Example
Convert string to number:
Try typing any string (eg: 123.e5
, 0b1010
, a123
) in the input field below.
Safely convert any value to a number.
Default fallback number is 0
.
Convert string to number:
Try typing any string (eg: 123.e5
, 0b1010
, a123
) in the input field below.