UNPKG

es-toolkit

Version:

A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.

7 lines (5 loc) 153 B
function findKey(obj, predicate) { const keys = Object.keys(obj); return keys.find(key => predicate(obj[key], key, obj)); } export { findKey };