2.0: Remove inArray shim

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
This commit is contained in:
Rick Waldron 2012-12-17 17:05:41 -05:00
parent bd9498c5ee
commit af06c3c771

View 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 ) {