Try to convert the given value into a finite number.
Syntax
import { toNum } from '@opentf/std';
toNum(val: unknown): number;
Examples
toNum(1) //=> 1
toNum('1.3') //=> 1.3
toNum('1_000') //=> 1000
toNum(Infinity) //=> NaN
toNum('a') //=> NaN
toNum('0xF') //=> 15