UNPKG

@modern-kit/utils

Version:
17 lines (14 loc) 330 B
'use strict'; 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; } exports.findKey = findKey; //# sourceMappingURL=index.cjs.map