mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-30 00:56:44 +01:00
SERVER-446 implement keySet w/o array comprehension, since v8 doesn't support that
This commit is contained in:
parent
92212a0cd2
commit
e7e790ee96
@ -273,7 +273,13 @@ Array.stdDev = function( arr ){
|
||||
}
|
||||
|
||||
Object.keySet = function( o ) {
|
||||
return [i for (i in o) if ( !( i in o.__proto__ && o[ i ] === o.__proto__[ i ] ) )];
|
||||
var ret = new Array();
|
||||
for( i in o ) {
|
||||
if ( !( i in o.__proto__ && o[ i ] === o.__proto__[ i ] ) ) {
|
||||
ret.push( i );
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
if ( ! ObjectId.prototype )
|
||||
|
Loading…
Reference in New Issue
Block a user