pub fn is_finite(value: &JsValue) -> bool
The global isFinite() function determines whether the passed value is a finite number. If needed, the parameter is first converted to a number.
isFinite()
MDN documentation