source:
node_modules/es-toolkit/dist/map/findValue.mjs
| Last change on this file was a762898, checked in by , 5 months ago | |
|---|---|
|
|
| File size: 252 bytes | |
| Line | |
|---|---|
| 1 | function findValue(map, doesMatch) { |
| 2 | let result = undefined; |
| 3 | for (const [key, value] of map) { |
| 4 | if (doesMatch(value, key, map)) { |
| 5 | result = value; |
| 6 | break; |
| 7 | } |
| 8 | } |
| 9 | return result; |
| 10 | } |
| 11 | |
| 12 | export { findValue }; |
Note:
See TracBrowser
for help on using the repository browser.
