Skip to content

isEmpty

Subhajit Sahu edited this page Dec 22, 2022 · 14 revisions

Check if an iterable is empty.

Similar: size, isEmpty.


function isEmpty(x)
// x: an iterable
const entries = require('extra-entries');

var x = [["a", 1], ["b", 2], ["c", 3]];
entries.isEmpty(x);
// → false

var x = [];
entries.isEmpty(x);
// → true


References

Clone this wiki locally