source:
node_modules/es-toolkit/dist/object/findKey.mjs
| Last change on this file was a762898, checked in by , 5 months ago | |
|---|---|
|
|
| File size: 153 bytes | |
| Rev | Line | |
|---|---|---|
| [a762898] | 1 | function findKey(obj, predicate) { |
| 2 | const keys = Object.keys(obj); | |
| 3 | return keys.find(key => predicate(obj[key], key, obj)); | |
| 4 | } | |
| 5 | ||
| 6 | export { findKey }; |
Note:
See TracBrowser
for help on using the repository browser.
