-
Notifications
You must be signed in to change notification settings - Fork 3
every
Subhajit Sahu edited this page Jun 11, 2020
·
15 revisions
Checks if all values satisfy a test. 🏃 📼 📦 🌔 📒
Similar: [some], [every].
object.every(x, fn, [ths]);
// x: an object
// fn: test function (v, k, x)
// ths: this argument
const object = require('extra-object');
var x = {a: 1, b: 2, c: -3, d: -4};
object.every(x, v => v > 0);
// false
object.every(x, v => v > -10);
// true