UNPKG

@modern-kit/utils

Version:
15 lines (13 loc) 308 B
function findKey(obj, predicate) { const keys = Object.keys(obj); for (let i = 0; i < keys.length; i++) { const key = keys[i]; const value = obj[key]; if (predicate({ value, key, obj })) { return key; } } return void 0; } export { findKey }; //# sourceMappingURL=index.mjs.map