libs/lodash.js
function findKey(object, predicate, thisArg) {
      predicate = lodash.createCallback(predicate, thisArg, 3);
      return baseFind(object, predicate, baseForOwn, true);
    }
function findKey(object, predicate, thisArg) {
      predicate = lodash.createCallback(predicate, thisArg, 3);
      return baseFind(object, predicate, baseForOwn, true);
    }
function findKey ( object , predicate , thisArg ) { predicate = lodash . createCallback ( predicate , thisArg , 3 ) ; return baseFind ( object , predicate , baseForOwn , true ) ; }
This method is like `_.findIndex` except that it returns the key of the
first element the predicate returns truthy for, instead of the element itself.

If a property name is provided for `predicate` the created "_.pluck" style
callback will return the property value of the given element.

If an object is provided for `predicate` the created "_.where" style callback
will return `true` for elements that have the properties of the given object,
else `false`.

@static
@memberOf _
@category Objects
@param {Object} object The object to search.
@param {Function|Object|string} [predicate=identity] The function called
per iteration. If a property name or object is provided it will be used
to create a "_.pluck" or "_.where" style callback respectively.
@param {*} [thisArg] The `this` binding of `predicate`.
@returns {string|undefined} Returns the key of the matched element, else `undefined`.
@example

var characters = {
'barney': { 'age': 36 },
'fred': { 'age': 40, 'blocked': true },
'pebbles': { 'age': 1 }
};

_.findKey(characters, function(chr) {
return chr.age < 40;
});
// => 'barney' (property order is not guaranteed across environments)

// using "_.where" callback shorthand
_.findKey(characters, { 'age': 1 });
// => 'pebbles'

// using "_.pluck" callback shorthand
_.findKey(characters, 'blocked');
// => 'fred'
This method is like _ . findIndex except that it returns the key of the first element the predicate returns truthy for instead of the element itself .