README
Finds values passing a test. :package: :smiley_cat: :running: :vhs: :moon: :scroll: :newspaper: :blue_book:
Alternatives: find, findAll.
Similar: find, search, searchValue.
This is part of package extra-map.
This is browserified, minified version of @extra-map/find-all.
It is exported as global variable map_findAll.
CDN: unpkg, jsDelivr.
map.findAll(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.findAll(x, v => v % 2 === 0);
// [ 2, 4 ] ^ ^
map.findAll(x, v => v % 8 === 0);
// []