Skip to content
Subhajit Sahu edited this page Jun 17, 2020 · 16 revisions

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

Similar: some, every.

map.some(x, fn, [ths]);
// x:   a map
// fn:  test function (v, k, x)
// ths: this argument
const map = require('extra-map');

var x = new Map([['a', 1], ['b', 2], ['c', -3], ['d', -4]]);
map.some(x, v => v > 10);
// false

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

references

Clone this wiki locally