source:
node_modules/es-toolkit/dist/object/findKey.mjs@
ba17441
| Last change on this file since ba17441 was a762898, checked in by , 5 months ago | |
|---|---|
|
|
| File size: 153 bytes | |
| Line | |
|---|---|
| 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.
