Skip to content

isEmpty

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

Checks is iterable is empty. 🏃 📼 📦 🌔 📒

Similar: index, indexRange, size, isEmpty.

iterable.isEmpty(x);
// x: an iterable
const iterable = require("extra-iterable");

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

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

references

Clone this wiki locally