size - nodef/extra-map GitHub Wiki

Find the size of a map.

Similar: size, isEmpty.

function size(x)
// x: a map
const map = require('extra-map');

var x = new Map(['a', 1], ['b', 2], ['c', 3](/nodef/extra-map/wiki/'a',-1],-['b',-2],-['c',-3));
map.size(x);
// → 3

References