-
Notifications
You must be signed in to change notification settings - Fork 1
every
Subhajit Sahu edited this page May 10, 2020
·
20 revisions
Checks if all values satisfy a test. 🏃 [:vhs:] 📦 🌔
iterable.every(x, fn, [ths]);
// x: an iterable
// fn: test function (v, i ,x)
// ths: this argument
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