Skip to content
Subhajit Sahu edited this page Dec 22, 2022 · 16 revisions

Check if any value satisfies a test.

Similar: some, every.


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

var x = [["a", 1], ["b", 2], ["c", -3], ["d", -4]];
entries.some(x, v => v > 10);
// → false

entries.some(x, v => v < 0);
// → true


References

Clone this wiki locally