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

Check if all values satisfy a test.

Similar: some, every.


function every(x, ft)
// x:  entries
// ft: test function (v, k, x)
const xilists = require('extra-ilists');

var x = [['a', 'b', 'c', 'd'], [1, 2, -3, -4]];
xilists.every(x, v => v > 0);
// → false

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


References

Clone this wiki locally