@extra-map/is-empty.min

Checks if map is empty. :package: :smiley_cat: :running: :vhs: :moon: :scroll: :newspaper: :blue_book:

Usage no npm install needed!

<script type="module">
  import extraMapIsEmptyMin from 'https://cdn.skypack.dev/@extra-map/is-empty.min';
</script>

README

Checks if map is empty. :package: :smiley_cat: :running: :vhs: :moon: :scroll: :newspaper: :blue_book:

Similar: size, isEmpty.

This is part of package extra-map.

This is browserified, minified version of @extra-map/is-empty.
It is exported as global variable map_isEmpty.
CDN: unpkg, jsDelivr.


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