Export function to validate if a value is a finite or infinite number
- License:
- Source:
Example
import { isInfinite } from 'itee-validators' if( isInfinite( value ) ) { //... } else { //... }
Methods
-
<static> isFinite(data)
-
Check if the given data is a finite number
Parameters:
Name Type Description data
* The data to check against the finite state Returns:
true if data is finite, false otherwise- Type
- boolean
-
<static> isInfinite(data)
-
Check if the given data is an infinite number
Parameters:
Name Type Description data
* The data to check against the infinite state Returns:
true if data is infinite, false otherwise- Type
- boolean
-
<static> isInfiniteNegative(data)
-
Check if the given data is an infinite negative number
Parameters:
Name Type Description data
* The data to check against the negative infinite state Returns:
true if data is negative infinite, false otherwise- Type
- boolean
-
<static> isInfinitePositive(data)
-
Check if the given data is an infinite positive number
Parameters:
Name Type Description data
* The data to check against the positive infinite state Returns:
true if data is positive infinite, false otherwise- Type
- boolean