-
Notifications
You must be signed in to change notification settings - Fork 1
every
Subhajit Sahu edited this page Feb 3, 2021
·
20 revisions
Check if all values satisfy a test.
function every(x, ft)
// x: an iterable
// ft: test function (v, i, x)
const xiterable = require('extra-iterable');
var x = [1, 2, -3, -4];
xiterable.every(x, v => v > 0);
// → false
xiterable.every(x, v => v > -10);
// → true