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

Check if any value satisfies a test.

Similar: some, every.


function some(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.some(x, v => v > 10);
// → false

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


References

Clone this wiki locally