source: node_modules/es-toolkit/dist/map/findKey.mjs

Last change on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago

Added visualizations

  • Property mode set to 100644
File size: 246 bytes
Line 
1function findKey(map, doesMatch) {
2 let result = undefined;
3 for (const [key, value] of map) {
4 if (doesMatch(value, key, map)) {
5 result = key;
6 break;
7 }
8 }
9 return result;
10}
11
12export { findKey };
Note: See TracBrowser for help on using the repository browser.