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 ientries = require('extra-ientries');

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

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


References

Clone this wiki locally