We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Pick an arbitrary entry.
Similar: randomEntry, entries, hasEntry.
function randomEntry(x, fr) // x: a map // fr: random number generator ([0, 1))
const map = require('extra-map'); var x = new Map([['a', 1], ['b', 2], ['c', 3]]); map.randomEntry(x); // → [ 'c', 3 ] map.randomEntry(x); // → [ 'b', 2 ]