Coerces a value to a finite number. Returns the finite number if valid, otherwise returns undefined (or an optional fallback). Converting a bigint can lose precision when it exceeds the safe integer range.
The value to coerce
Optional fallback if val is not a finite number
The coerced finite number or fallback
Coerces a value to a finite number. Returns the finite number if valid, otherwise returns undefined (or an optional fallback). Converting a bigint can lose precision when it exceeds the safe integer range.
The value to coerce
Optional fallback if val is not a finite number
The coerced finite number or fallback
Coerces a value to a finite number. Returns the finite number if valid, otherwise returns undefined (or an optional fallback). Converting a bigint can lose precision when it exceeds the safe integer range.
The value to coerce
Optional fallback if val is not a finite number
The coerced finite number or fallback
Coerces a value to a finite number. Returns the finite number if valid, otherwise returns undefined (or an optional fallback). Converting a bigint can lose precision when it exceeds the safe integer range.