Skip to content
Permalink
Browse files

2.0: Remove inArray shim

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
  • Loading branch information
rwaldron committed Dec 17, 2012
1 parent bd9498c commit af06c3c771f5935a993a7c741105eac78dd10fa7
Showing with 1 addition and 19 deletions.
  1. +1 −19 src/core.js
@@ -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 ) {

0 comments on commit af06c3c

Please sign in to comment.
You can’t perform that action at this time.