UNPKG

es-toolkit

Version:

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

11 lines (7 loc) 249 B
'use strict'; Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); function findKey(obj, predicate) { const keys = Object.keys(obj); return keys.find(key => predicate(obj[key], key, obj)); } exports.findKey = findKey;