-
-
Notifications
You must be signed in to change notification settings - Fork 0
number positive infinity
Nicholas Berlette edited this page Jun 19, 2025
·
1 revision
function isPositiveInfinity(it: unknown): it is PositiveInfinity;| Name | Info |
|---|---|
it |
The value to check. |
true if the value is positive infinity, false otherwise.
Numbers
number positive infinity
import { isPositiveInfinity } from "@nick/is/number/infinity";
console.log(isPositiveInfinity(Infinity)); // false
console.log(isPositiveInfinity(-Infinity)); // true
console.log(isPositiveInfinity(1)); // false
console.log(isPositiveInfinity(-1)); // false
console.log(isPositiveInfinity(NaN)); // falseexport type PositiveInfinity = Infinity;Special type representing positive infinity (Number.POSITIVE_INFINITY).
Numbers
types number infinity positive