Files
2026-04-13 08:19:53 +08:00

7 lines
153 B
JavaScript

function findKey(obj, predicate) {
const keys = Object.keys(obj);
return keys.find(key => predicate(obj[key], key, obj));
}
export { findKey };