-
-
Notifications
You must be signed in to change notification settings - Fork 0
number negative nonzero integer
Nicholas Berlette edited this page Jun 19, 2025
·
1 revision
function isNegativeNonZeroInteger<N = number>(
it: N,
): it is NegativeNonZeroInteger<N>;Checks if a given value is a negative nonzero integer.
| Name | Info |
|---|---|
it |
The value to check. |
true if the value is a negative nonzero integer, false otherwise.
Numbers
import { isNegativeNonZeroInteger } from "jsr:@nick/is/integer";
console.log(isNegativeNonZeroInteger(0)); // false
console.log(isNegativeNonZeroInteger(1)); // false
console.log(isNegativeNonZeroInteger(-1)); // true
console.log(isNegativeNonZeroInteger(1.5)); // false
console.log(isNegativeNonZeroInteger(NaN)); // false
console.log(isNegativeNonZeroInteger(Infinity)); // truefunction isNegativeNonZeroInteger(it: unknown): it is NegativeNonZeroInteger;Checks if a given value is a negative nonzero integer.
| Name | Info |
|---|---|
it |
The value to check. |
true if the value is a negative nonzero integer, false otherwise.
Numbers
import { isNegativeNonZeroInteger } from "jsr:@nick/is/integer";
console.log(isNegativeNonZeroInteger(0)); // false
console.log(isNegativeNonZeroInteger(1)); // false
console.log(isNegativeNonZeroInteger(-1)); // true
console.log(isNegativeNonZeroInteger(1.5)); // false
console.log(isNegativeNonZeroInteger(NaN)); // false
console.log(isNegativeNonZeroInteger(Infinity)); // trueexport type NegativeNonZeroInteger<N = number> = Cast<
N,
NEGATIVE & NON_ZERO & INTEGER
>;Casts a value into a negative nonzero integer type. If the value is not a
number, it will resolve to never.
-
N(default:number)
Numbers