like objectKeys, but includes keys from prototype chain.
@param object the object whose prototypal keys will be returned
@param ignoreKeys an array of keys to ignore
 Duplicates code in UI-Router common.js
328868
function protoKeys(object, ignoreKeys) {
  var result = [];
  for (var key in object) {
    if (!ignoreKeys || ignoreKeys.indexOf(key) === -1)
      result.push(key);
  }
  return result;
}
514955
public static void checkKeys(JSONObject o, String... keys) throws JSONConverterException {
        for (String k : keys) {
            if (!o.containsKey(k)) {
                throw new JSONConverterException("Missing key '" + k + "'");
            }
        }
    }
98334
function keys(obj) {
    var keyList = [];
    for (var key in obj) {
        if (obj.hasOwnProperty(key)) {
            keyList.push(key);
        }
    }
    return keyList;
}
45163
function objectForKey(object, key, primitives){
  var proto = primitives.getPrototypeOf(object)
  if (!proto || hasOwnProperty(object, key)){
    return object
  } else {
    return objectForKey(proto, key, primitives)
  }
}
519233
@SuppressWarnings("unchecked")
    public static <K, V> List<Tuple<K, V>> pick(final Map<K, V> object, final K ... keys) {
        return without(map(newArrayList(object.entrySet()), new Function<Map.Entry<K, V>, Tuple<K, V>>() {
            @Override
            public Tuple<K, V> apply(Map.Entry<K, V> entry) {
                if (Arrays.asList(keys).contains(entry.getKey())) {
                    return Tuple.create(entry.getKey(), entry.getValue());
                } else {
                    return null;
                }
            }
        }), (Tuple<K, V>) null);
    }
209109
function Object_keys(obj) { // @arg Object|Function|Array
                            // @ret KeyStringArray [key, ... ]
    var result = [], key, i = 0;

    // [IE6][IE7][IE8] host-objects has not hasOwnProperty
    if ( !("hasOwnProperty" in obj) ) {
        for (key in obj) {
            result[i++] = key;
        }
    } else {
        for (key in obj) {
            if ( obj["hasOwnProperty"](key) ) {
                result[i++] = key;
            }
        }
    }
    return result;
}
1172632
function( object ) {
		var keys = Object.keys(object), k, v, lookupString,
			lVals = [], lArrays = [], lObjects = [];

		// Sort to values, arrays and objects
		lookupString = "";
		for (var i=0; i<keys.length; ++i) {
			k = keys[i]; v = object[k];
			if ((v instanceof Uint8Array) || (v instanceof Int8Array) ||
				(v instanceof Uint16Array) || (v instanceof Int16Array) ||
				(v instanceof Uint32Array) || (v instanceof Int32Array) ||
				(v instanceof Float32Array) || (v instanceof Float64Array) ||
				(v instanceof Array) ) {
				lArrays.push(k);
				lookupString += "@"+k;
			} else if (v.constructor === ({}).constructor) {
				lObjects.push(k);
				lookupString += "%"+k;
			} else {
				lVals.push(k);
				lookupString += "$"+k;
			}
		}

		// Lookup or create signature
		i = this.plainObjectSignatureLookup[lookupString];
		if (i === undefined) {

			// Compile signature
			var sigbuf = [];
			sigbuf.push( pack2b( lVals.length ) );
			for (var i=0; i<lVals.length; ++i) {
				sigbuf.push( pack2b( this.stringID(lVals[i]) ) );
			}
			sigbuf.push( pack2b( lArrays.length ) );
			for (var i=0; i<lArrays.length; ++i) {
				sigbuf.push( pack2b( this.stringID(lArrays[i]) ) );
			}
			sigbuf.push( pack2b( lObjects.length ) );
			for (var i=0; i<lObjects.length; ++i) {
				sigbuf.push( pack2b( this.stringID(lObjects[i]) ) );
			}

			// Encode to the 16-bit stream
			this.plainObjectSignatureTable.push( Buffer.concat( sigbuf ) );
			this.plainObjectSignatureLookup[lookupString] 
				= i = this.plainObjectSignatureTable.length - 1;
		}

		// Return index
		return [i, lVals, lArrays, lObjects];
	}
54665
function (instance, instanceKey, type, json, jsonKey) {
    var conversionFunctionsList = [];
    var objectInstance;
    /**
     * If instanceKey is not passed on then it's the first iteration of the functions.
     */
    // tslint:disable-next-line:triple-equals
    if (instanceKey != undefined) {
        objectInstance = new type();
        instance[instanceKey] = objectInstance;
    }
    else {
        objectInstance = instance;
    }
    var objectKeys = Object.keys(objectInstance);
    objectKeys = objectKeys.concat((Reflect.getMetadata(METADATA_JSON_PROPERTIES_NAME, objectInstance) || []).filter(function (item) {
        if (objectInstance.constructor.prototype.hasOwnProperty(item) && Object.getOwnPropertyDescriptor(objectInstance.constructor.prototype, item).set === undefined) {
            // Property does not have setter
            return false;
        }
        return objectKeys.indexOf(item) < 0;
    }));
    objectKeys = objectKeys.filter(function (item) {
        return !Reflect.hasMetadata(METADATA_JSON_IGNORE_NAME, objectInstance, item);
    });
    objectKeys.forEach(function (key) {
        /**
         * Check if there is any DecoratorMetadata attached to this property, otherwise create a new one.
         */
        var metadata = getJsonPropertyDecoratorMetadata(objectInstance, key);
        if (metadata === undefined) {
            metadata = { name: key, required: false, access: exports.AccessType.BOTH };
        }
        // tslint:disable-next-line:triple-equals
        if (exports.AccessType.WRITE_ONLY != metadata.access) {
            /**
             * Check requried property
             */
            if (metadata.required && json[metadata.name] === undefined) {
                throw new JsonConverstionError("JSON structure does have have required property '" + metadata.name + "' as required by '" + getTypeNameFromInstance(objectInstance) + "[" + key + "]", json);
            }
            // tslint:disable-next-line:triple-equals
            var jsonKeyName = metadata.name != undefined ? metadata.name : key;
            // tslint:disable-next-line:triple-equals
            if (json[jsonKeyName] != undefined) {
                /**
                 * If metadata has deserializer, use that one instead.
                 */
                // tslint:disable-next-line:triple-equals
                if (metadata.deserializer != undefined) {
                    objectInstance[key] = getOrCreateDeserializer(metadata.deserializer).deserialize(json[jsonKeyName]);
                }
                else if (metadata.type === undefined) {
                    /**
                    * If we do not have any type defined, then we can't do much here but to hope for the best.
                    */
                    objectInstance[key] = json[jsonKeyName];
                }
                else {
                    if (!isArrayType(objectInstance, key)) {
                        // tslint:disable-next-line:triple-equals
                        var typeName = metadata.type != undefined ? getTypeNameFromInstance(metadata.type) : getTypeName(objectInstance, key);
                        if (!isSimpleType(typeName)) {
                            objectInstance[key] = new metadata.type();
                            conversionFunctionsList.push({ functionName: Constants.OBJECT_TYPE, type: metadata.type, instance: objectInstance[key], json: json[jsonKeyName] });
                        }
                        else {
                            conversionFunctions[typeName](objectInstance, key, typeName, json, jsonKeyName);
                        }
                    }
                    else {
                        var moreFunctions = conversionFunctions[Constants.ARRAY_TYPE](objectInstance, key, metadata.type, json, jsonKeyName);
                        moreFunctions.forEach(function (struct) {
                            conversionFunctionsList.push(struct);
                        });
                    }
                }
            }
        }
    });
    return conversionFunctionsList;
}
862651
public VisDialog key (final int keycode, final Object object) {
		addListener(new InputListener() {
			@Override
			public boolean keyDown (InputEvent event, int keycode2) {
				if (keycode == keycode2) {
					result(object);
					if (!cancelHide) hide();
					cancelHide = false;
				}
				return false;
			}
		});
		return this;
	}
434083
function(mapping, keys) {
  assert(keys instanceof Array, 'keys must be an array');
  assert(keys.length > 0, 'CompositeKey needs at least one key');

  // Set keys
  this.keys = keys;

  // Set key types
  this.types = [];
  for (var i = 0; i < keys.length; i++) {
    assert(mapping[keys[i]], 'key \'' + keys[i] + '\' is not defined in mapping');
    this.types[i] = mapping[keys[i]];
  }

  // Set covers
  this.covers = keys;
}
1260511
def observable_object_keys(instance):
    
    digits_re = re.compile(r"^\d+$")
    for key in instance['objects']:
        if not digits_re.match(key):
            yield JSONError("'%s' is not a good key value. Observable Objects "
                            "should use non-negative integers for their keys."
                            % key, instance['id'], 'observable-object-keys')
760782
def query_ary_irrelevant_keys(params, base_response_key, property_key)
      query(params) do |return_val, query|
        return_val.concat(query[base_response_key].values.collect { |obj| obj[property_key] })
      end
    end
101554
function omit(keys, object){
  var ret = {};

  for (var item in object) {
    ret[item] = object[item];
  }

  for (var i = 0; i < keys.length; i++) {
    delete ret[keys[i]];
  }
  return ret;
}
14226
private String buildObjectKey(final Object object) {

        String objectKey = null;
        final Class<?> objectClass = object.getClass();

        final KeyGenerator typeGenerator = objectClass.getAnnotation(KeyGenerator.class);
        if (typeGenerator == null) {
            objectKey = generateAggregatedKey(object);
        } else {
            objectKey = generateTypeKey(object, typeGenerator);
        }

        // If no Type keyGenerator neither Method Generator were used, use the default toString method
        if (objectKey == null) {
            objectKey = object.toString();
        }

        return objectKey;
    }
1321560
public void put(DBObject key, Object object) {
        //noinspection unchecked
        objectCache.put(flatten(key.toMap()), new WeakReference(object));
    }
920360
function getObjectWithKeyAsCjs(key, object) {
	const jsContents = Object.keys(object).reduce((jsLines, name) => {
		jsLines.push(`\t\t'${escapeForJS(name)}': '${escapeForJS(object[name])}'`);

		return jsLines;
	}, []).join(',\n');
	const cjs = `\n\t${key}: {\n${jsContents}\n\t}`;

	return cjs;
}
526420
function mustContain(object = {}, ...keys) {
  let missingKeys = [];
  let promise;
  keys.forEach((key) => {
    if (object[key] === undefined) {
      missingKeys.push(key);
    }
  });
  if (missingKeys.length === 0) {
    missingKeys = undefined;
    promise = Promise.resolve();
  } else {
    promise = Promise.reject(
      new Error(`Missing keys ${missingKeys.join(', ')}`)
    );
  }

  return {
    missingKeys,
    promise,
  };
}