Skip to content
Subhajit Sahu edited this page Jun 20, 2020 · 20 revisions

Checks if all values satisfy a test. 🏃 📼 📦 🌔 📒

Similar: some, every.

iterable.every(x, [ft]);
// x:  an iterable
// ft: test function (v, i, x)
const iterable = require('extra-iterable');

var x = [1, 2, -3, -4];
iterable.every(x, v => v > 0);
// false

iterable.every(x, v => v > -10);
// true

references

Clone this wiki locally