Const
Type guard that checks if a value is an integer.
Returns true for an integer — a value with no fractional component, including values outside the safe integer range (unlike SafeInt).
true
SafeInt
true if the value is an integer, false otherwise
false
assert.isTrue(isInt(5));assert.isFalse(isInt(5.25));assert.isTrue(Int.is(-10)); Copy
assert.isTrue(isInt(5));assert.isFalse(isInt(5.25));assert.isTrue(Int.is(-10));
Type guard that checks if a value is an integer.
Returns
truefor an integer — a value with no fractional component, including values outside the safe integer range (unlikeSafeInt).