- Complete React app with 7 developer tools - JSON Tool with visual structured editor - Serialize Tool with visual structured editor - URL, Base64, CSV/JSON, Beautifier, Diff tools - Responsive navigation with dropdown menu - Dark/light mode toggle - Mobile-responsive design with sticky header - All tools working with copy/paste functionality
15 lines
406 B
JavaScript
15 lines
406 B
JavaScript
var keys = require('./keys.js');
|
|
var _cb = require('./_cb.js');
|
|
|
|
// Returns the first key on an object that passes a truth test.
|
|
function findKey(obj, predicate, context) {
|
|
predicate = _cb(predicate, context);
|
|
var _keys = keys(obj), key;
|
|
for (var i = 0, length = _keys.length; i < length; i++) {
|
|
key = _keys[i];
|
|
if (predicate(obj[key], key, obj)) return key;
|
|
}
|
|
}
|
|
|
|
module.exports = findKey;
|