aboutsummaryrefslogtreecommitdiffstats
path: root/src/core.js
diff options
context:
space:
mode:
authorMike Sherov <mike.sherov@gmail.com>2012-07-06 09:09:40 -0400
committerDave Methvin <dave.methvin@gmail.com>2012-07-06 09:09:40 -0400
commit7532bd7df56d8654733ec06617e80447743f2adc (patch)
treee4a1d46ede550fd5ae17cb38fb9d3b78c1012912 /src/core.js
parent1793eab32bc8a00b2ad041c9b10ad3bdd2bec702 (diff)
parenta69fbbaa8bbb2f17d798bb05cca24b01fddcd2a2 (diff)
downloadjquery-7532bd7df56d8654733ec06617e80447743f2adc.tar.gz
jquery-7532bd7df56d8654733ec06617e80447743f2adc.zip
Stop using reserved words as argument names, closes gh-841.
Diffstat (limited to 'src/core.js')
-rw-r--r--src/core.js46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/core.js b/src/core.js
index 29fc29bc4..9a506f31e 100644
--- a/src/core.js
+++ b/src/core.js
@@ -564,21 +564,21 @@ jQuery.extend({
},
// args is for internal usage only
- each: function( object, callback, args ) {
+ each: function( obj, callback, args ) {
var name, i = 0,
- length = object.length,
- isObj = length === undefined || jQuery.isFunction( object );
+ length = obj.length,
+ isObj = length === undefined || jQuery.isFunction( obj );
if ( args ) {
if ( isObj ) {
- for ( name in object ) {
- if ( callback.apply( object[ name ], args ) === false ) {
+ for ( name in obj ) {
+ if ( callback.apply( obj[ name ], args ) === false ) {
break;
}
}
} else {
for ( ; i < length; ) {
- if ( callback.apply( object[ i++ ], args ) === false ) {
+ if ( callback.apply( obj[ i++ ], args ) === false ) {
break;
}
}
@@ -587,21 +587,21 @@ jQuery.extend({
// A special, fast, case for the most common use of each
} else {
if ( isObj ) {
- for ( name in object ) {
- if ( callback.call( object[ name ], name, object[ name ] ) === false ) {
+ for ( name in obj ) {
+ if ( callback.call( obj[ name ], name, obj[ name ] ) === false ) {
break;
}
}
} else {
for ( ; i < length; ) {
- if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) {
+ if ( callback.call( obj[ i ], i, obj[ i++ ] ) === false ) {
break;
}
}
}
}
- return object;
+ return obj;
},
// Use native String.trim function wherever possible
@@ -620,38 +620,38 @@ jQuery.extend({
},
// results is for internal usage only
- makeArray: function( array, results ) {
+ makeArray: function( arr, results ) {
var ret = results || [];
- if ( array != null ) {
+ if ( arr != null ) {
// The window, strings (and functions) also have 'length'
// Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
- var type = jQuery.type( array );
+ var type = jQuery.type( arr );
- if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) {
- core_push.call( ret, array );
+ if ( arr.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( arr ) ) {
+ core_push.call( ret, arr );
} else {
- jQuery.merge( ret, array );
+ jQuery.merge( ret, arr );
}
}
return ret;
},
- inArray: function( elem, array, i ) {
+ inArray: function( elem, arr, i ) {
var len;
- if ( array ) {
+ if ( arr ) {
if ( core_indexOf ) {
- return core_indexOf.call( array, elem, i );
+ return core_indexOf.call( arr, elem, i );
}
- len = array.length;
+ 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 array && array[ i ] === elem ) {
+ if ( i in arr && arr[ i ] === elem ) {
return i;
}
}
@@ -817,7 +817,7 @@ jQuery.extend({
}
});
-jQuery.ready.promise = function( object ) {
+jQuery.ready.promise = function( obj ) {
if ( !readyList ) {
readyList = jQuery.Deferred();
@@ -871,7 +871,7 @@ jQuery.ready.promise = function( object ) {
}
}
}
- return readyList.promise( object );
+ return readyList.promise( obj );
};
// Populate the class2type map