Skip to content
Subhajit Sahu edited this page Dec 8, 2022 · 15 revisions

Check if all values satisfy a test.

Similar: some, every.


function every(x, ft)
// x:  an object
// ft: test function (v, k, x)
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


References

Clone this wiki locally