Skip to content

isEmpty

Subhajit Sahu edited this page Dec 5, 2022 · 12 revisions

Check if a map is empty.

Similar: size, isEmpty.


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

var x = new Map([['a', 1], ['b', 2], ['c', 3]]);
map.isEmpty(x);
// → false

var x = new Map();
map.isEmpty(x);
// → true


References

Clone this wiki locally