We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Find first value passing a test (default order).
Alternatives: find, findAll. Similar: find, search, searchValue.
function find(x, ft) // x: a map // ft: test function (v, k, x)
const map = require('extra-map'); var x = new Map([['a', 1], ['b', 2], ['c', 3], ['d', 4]]); map.find(x, v => v % 2 === 0); // → 2 ^ map.find(x, v => v % 8 === 0); // → undefined