UNPKG

es-toolkit

Version:

A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.

17 lines (13 loc) 350 B
'use strict'; Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); function findValue(map, doesMatch) { let result = undefined; for (const [key, value] of map) { if (doesMatch(value, key, map)) { result = value; break; } } return result; } exports.findValue = findValue;