// ...but misinterprets leading-number strings, particularly hex literals ("0x...")
// subtraction forces infinities to NaN
// adding 1 corrects loss of precision from parseFloat (#15100)
- return !jQuery.isArray( obj ) && ( obj - parseFloat( obj ) + 1 ) >= 0;
+ var realStringObj = obj && obj.toString();
+ return !jQuery.isArray( obj ) && ( realStringObj - parseFloat( realStringObj ) + 1 ) >= 0;
},
isEmptyObject: function( obj ) {
assert.equal( t( new Date() ), false, "Instance of a Date" );
} );
+QUnit[ typeof Symbol === "function" ? "test" : "skip" ]( "isNumeric(Symbol)", function( assert ) {
+ assert.expect( 2 );
+
+ assert.equal( jQuery.isNumeric( Symbol() ), false, "Symbol" );
+ assert.equal( jQuery.isNumeric( Object( Symbol() ) ), false, "Symbol inside an object" );
+} );
+
QUnit.test( "isXMLDoc - HTML", function( assert ) {
assert.expect( 4 );