There was an error while loading. Please reload this page.
Find keys of entries passing a test.
Alternatives: search, searchAll. Similar: search, searchValue.
function searchAll(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', -2]]); map.searchAll(x, v => v === 2); // → [ 'b' ] ^ map.searchAll(x, v => Math.abs(v) === 2); // → [ 'b', 'd' ] ^ ^