Const
Type guard that checks if a value is a non-negative integer.
Returns true for a non-negative integer — a value with no fractional component, including values outside the safe integer range (unlike SafeInt).
true
SafeInt
true if the value is a non-negative integer, false otherwise
false
assert.isTrue(isUint(4));assert.isFalse(isUint(-1));assert.isTrue(Uint.is(0)); Copy
assert.isTrue(isUint(4));assert.isFalse(isUint(-1));assert.isTrue(Uint.is(0));
Type guard that checks if a value is a non-negative integer.
Returns
truefor a non-negative integer — a value with no fractional component, including values outside the safe integer range (unlikeSafeInt).