(obj, predicate, context)
| 1230 | |
| 1231 | // Returns the first key on an object that passes a truth test. |
| 1232 | function findKey(obj, predicate, context) { |
| 1233 | predicate = cb(predicate, context); |
| 1234 | var _keys = keys(obj), key; |
| 1235 | for (var i = 0, length = _keys.length; i < length; i++) { |
| 1236 | key = _keys[i]; |
| 1237 | if (predicate(obj[key], key, obj)) return key; |
| 1238 | } |
| 1239 | } |
| 1240 | |
| 1241 | // Internal function to generate `_.findIndex` and `_.findLastIndex`. |
| 1242 | function createPredicateIndexFinder(dir) { |