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