Tests if a value is a nonnegative integer.
value to test
boolean indicating whether value is a nonnegative integer
var bool = isNonNegativeInteger( 5.0 );
// returns true
var bool = isNonNegativeInteger( new Number( 5.0 ) );
// returns true
var bool = isNonNegativeInteger( -5.0 );
// returns false
var bool = isNonNegativeInteger( 3.14 );
// returns false
var bool = isNonNegativeInteger( null );
// returns false
Tests if a value is a number object having a nonnegative integer value.
value to test
boolean indicating if a value is a number object having a nonnegative integer value
var bool = isNonNegativeInteger.isObject( 3.0 );
// returns false
var bool = isNonNegativeInteger.isObject( new Number( 3.0 ) );
// returns true
Tests if a value is a number primitive having a nonnegative integer value.
value to test
boolean indicating if a value is a number primitive having a nonnegative integer value
var bool = isNonNegativeInteger.isPrimitive( 3.0 );
// returns true
var bool = isNonNegativeInteger.isPrimitive( new Number( 3.0 ) );
// returns false
Interface defining
isNonNegativeInteger
with methods for testing for primitives and objects, respectively.