Here you can find the source of getKeys()
//prototype magic Object.prototype.getKeys = function(){ var keys = []; for (var key in this) { if (this.hasOwnProperty(key)) { keys.push(key);/*from w w w. j ava2 s. c o m*/ } } return keys }
Object.prototype.keyAt = function(index){ return Object.keys(this)[index];
Object.prototype.keys = function() { var keys = []; $.each(this, function(key, value) { keys.push(key); }); return keys; };
Object.defineProperty(Object.prototype, 'keys_length', { enumerable:false, value:function() { var size = 0, key; for (key in this) { if (this.hasOwnProperty(key)) size++; return size; })
Object.prototype.getOwn = function(key, defaultValue) { if (this.hasOwnProperty(key)) { return this[key]; else { return defaultValue; };
Object.prototype.hasKey = function(skey){ for (var key in this) { if (this.hasOwnProperty(key)) { if(key==skey){ return true return false ...
Object.prototype.contains = function (key) { return this.hasOwnProperty(key); };
Object.prototype.empty = function() { return Object.keys(this).length <= 0;