Permalink
Browse files

Revert "Core: Warn and fill jQuery.isArray"

This reverts commit c73559f.
  • Loading branch information...
dmethvin committed Jan 29, 2017
1 parent cd22666 commit e967c3b98bf0077e4577d4ec05258a7e0b5063e0
Showing with 2 additions and 25 deletions.
  1. +2 −9 src/core.js
  2. +0 −11 test/core.js
  3. +0 −5 warnings.md
View
@@ -73,10 +73,10 @@ jQuery.parseJSON = function() {
jQuery.isNumeric = function( val ) {
// The jQuery 2.2.3 implementation of isNumeric, using Array.isArray
// The jQuery 2.2.3 implementation of isNumeric
function isNumeric2( obj ) {
var realStringObj = obj && obj.toString();
return !Array.isArray( obj ) && ( realStringObj - parseFloat( realStringObj ) + 1 ) >= 0;
return !jQuery.isArray( obj ) && ( realStringObj - parseFloat( realStringObj ) + 1 ) >= 0;
}
var newValue = oldIsNumeric( val ),
@@ -92,13 +92,6 @@ jQuery.isNumeric = function( val ) {
migrateWarnFunc( jQuery, "holdReady", jQuery.holdReady,
"jQuery.holdReady is deprecated" );
migrateWarnFunc( jQuery, "isArray",
function( a ) {
return Array.isArray( a );
},
"jQuery.isArray is deprecated; use Array.isArray"
);
migrateWarnFunc( jQuery, "unique", jQuery.uniqueSort,
"jQuery.unique is deprecated; use jQuery.uniqueSort" );
View
@@ -284,17 +284,6 @@ QUnit.test( "jQuery.holdReady (warn only)", function( assert ) {
} );
} );
QUnit.test( "jQuery.isArray", function( assert ) {
assert.expect( 4 );
expectWarning( "isArray", 1, function() {
assert.equal( jQuery.isArray( [] ), true, "empty array" );
assert.equal( jQuery.isArray( "" ), false, "empty string" );
assert.equal( jQuery.isArray( jQuery().toArray() ), true, "toArray" );
} );
} );
TestManager.runIframeTest( "old pre-3.0 jQuery", "core-jquery2.html",
function( assert, jQuery, window, document, log ) {
assert.expect( 1 );
View
@@ -206,11 +206,6 @@ See jQuery-ui [commit](https://github.com/jquery/jquery-ui/commit/c0093b599fcd58
**Solution:** Rewrite the page so that it does not require all jQuery ready handlers to be delayed. This might be accomplished, for example, by late-loading only the code that requires the delay when it is safe to run. Due to the complexity of this method, jQuery Migrate does not attempt to fill the functionality. If the underlying version of jQuery used with jQuery Migrate no longer contains `jQuery.holdReady()` the code will fail shortly after this warning appears.
### JQMIGRATE: jQuery.isArray is deprecated; use Array.isArray
**Cause:** Older versions of JavaScript made it difficult to determine if a particular object was a true `Array`, so jQuery provided a cross-browser function to do the work. The browsers supported by jQuery 3.0 all provide `Array.isArray(obj)` for this purpose.
**Solution**: Replace any calls to `jQuery.isArray` with `Array.isArray`.
### JQMIGRATE: jQuery.fn.click() event shorthand is deprecated

0 comments on commit e967c3b

Please sign in to comment.