},
isObjectLiteral: function( obj ) {
- if ( toString.call(obj) !== "[object Object]" ) {
+ if ( toString.call(obj) !== "[object Object]" || typeof obj.nodeType === "number" ) {
return false;
}
return ret;
},
- map: function( elems, callback ) {
+ // arg is for internal usage only
+ map: function( elems, callback, arg ) {
var ret = [], value;
// Go through the array, translating each of the items to their
// new value (or values).
for ( var i = 0, length = elems.length; i < length; i++ ) {
- value = callback( elems[ i ], i );
+ value = callback( elems[ i ], i, arg );
if ( value != null ) {
ret[ ret.length ] = value;