We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Counts values which satisfy a test. 🏃 📼 📦 🌔 📒
Alternatives: count, countAs.
set.count(x, ft); // x: a set // ft: test function (v, v, x)
const set = require('extra-set'); var x = new Set([1, 2, 3, 4, 5]); set.count(x, v => v % 2 === 1); // 3 set.count(x, v => v % 2 === 0); // 2