Skip to content
Subhajit Sahu edited this page Jun 18, 2020 · 15 revisions

Checks if any value satisfies a test. 🏃 📼 📦 🌔 📒

Similar: some, every.

lists.some(x, [ft]);
// x:  lists
// 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