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.
Check if map has an entry.
Similar: has, hasValue, hasEntry, hasSubset, hasPath. Similar: randomEntry, entries, hasEntry.
function hasEntry(x, e, fc, fm) // x: a map // e: search entry ([k, v]) // fc: compare function (a, b) // fm: map function (v, k, x)
const map = require('extra-map'); var x = new Map([['a', 1], ['b', 2], ['c', -3]]); map.hasEntry(x, ['c', 3]); // → false map.hasEntry(x, ['c', 3], (a, b) => Math.abs(a) - Math.abs(b)); // → true map.hasEntry(x, ['c', 3], null, v => Math.abs(v)); // → true