// parseFloat NaNs numeric-cast false positives (null|true|false|"")
// ...but misinterprets leading-number strings, particularly hex literals ("0x...")
// subtraction forces infinities to NaN
- return obj - parseFloat( obj ) >= 0;
+ return !jQuery.isArray( obj ) && obj - parseFloat( obj ) >= 0;
},
isEmptyObject: function( obj ) {
});
test( "isNumeric", function() {
- expect( 36 );
+ expect( 38 );
var t = jQuery.isNumeric,
Traditionalists = /** @constructor */ function(n) {
equal( t(Number.NEGATIVE_INFINITY), false, "Negative Infinity");
equal( t(rong), false, "Custom .toString returning non-number");
equal( t({}), false, "Empty object");
+ equal( t( [] ), false, "Empty array" );
+ equal( t( [ 42 ] ), false, "Array with one number" );
equal( t(function(){} ), false, "Instance of a function");
equal( t( new Date() ), false, "Instance of a Date");
equal( t(function(){} ), false, "Instance of a function");