]> source.dussan.org Git - jquery.git/commitdiff
2.0: Remove inArray shim
authorRick Waldron <waldron.rick@gmail.com>
Mon, 17 Dec 2012 22:05:41 +0000 (17:05 -0500)
committerRick Waldron <waldron.rick@gmail.com>
Wed, 26 Dec 2012 18:34:37 +0000 (13:34 -0500)
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
src/core.js

index d4166ce198c0083843bafcae51dd3e55effc3fd2..ea0f438f82bb816a8860807a2000f0e52eae6e60 100644 (file)
@@ -615,25 +615,7 @@ jQuery.extend({
        },
 
        inArray: function( elem, arr, i ) {
-               var len;
-
-               if ( arr ) {
-                       if ( core_indexOf ) {
-                               return core_indexOf.call( arr, elem, i );
-                       }
-
-                       len = arr.length;
-                       i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
-
-                       for ( ; i < len; i++ ) {
-                               // Skip accessing in sparse arrays
-                               if ( i in arr && arr[ i ] === elem ) {
-                                       return i;
-                               }
-                       }
-               }
-
-               return -1;
+               return core_indexOf.call( arr, elem, i );
        },
 
        merge: function( first, second ) {