(obj, predicate, context)
| 1265 | |
| 1266 | // Returns the first key on an object that passes a truth test. |
| 1267 | function findKey(obj, predicate, context) { |
| 1268 | predicate = cb(predicate, context); |
| 1269 | var _keys = keys(obj), key; |
| 1270 | for (var i = 0, length = _keys.length; i < length; i++) { |
| 1271 | key = _keys[i]; |
| 1272 | if (predicate(obj[key], key, obj)) return key; |
| 1273 | } |
| 1274 | } |
| 1275 | |
| 1276 | // Internal function to generate `_.findIndex` and `_.findLastIndex`. |
| 1277 | function createPredicateIndexFinder(dir) { |