Skip to content

isEmpty

Subhajit Sahu edited this page Feb 3, 2021 · 13 revisions

Check if an iterable is empty.

Similar: index, indexRange, size, isEmpty.


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

var x = [1, 2, 3];
xiterable.isEmpty(x);
// → false

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


References

Clone this wiki locally