@extra-array/every
v2.10.19
Published
Checks if all values satisfy a test.
Downloads
216
Readme
Checks if all values satisfy a test. :package: :smiley_cat: :running: :vhs: :moon: :scroll: :newspaper: :blue_book:
This is part of package extra-array.
array.every(x, [ft]);
// x: an array
// ft: test function (v, i, x)
const array = require("extra-array");
var x = [1, 2, -3, -4];
array.every(x, v => v > 0);
// false
array.every(x, v => v > -10);
// true