Skip to content

isEmpty

Subhajit Sahu edited this page Jun 13, 2020 · 15 revisions

Checks if map is empty. 🏃 📼 📦 🌔 📒

Similar: size, isEmpty.

map.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