isFiniteNumber
Verifies if provided Verificable
represents a number that is a finite value. Number values like Infinity
, -Infinity
, NaN
, since not a finite values, will not match this Predicate
.
The check internally is done by calling the JS function Number.isFinite()
.
Possible errors:
If provided Verificable
is not a number:
Verificable
is not a number:If provided Verificable
is not a finite number:
Verificable
is not a finite number:Examples:
Each of examples uses this import statement:
Null or undefined is not considered a number:
String value is not considered a number as well:
Infinity
, -Infinity
, or NaN
are not considered finite numbers:
Infinity
, -Infinity
, or NaN
are not considered finite numbers:Other numbers are considered finite numbers:
Last updated
Was this helpful?