We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Finds largest value. 🏃 [:vhs:] 📦 🌔
Alternatives: compare, map.
iterable.max(x, [fn]); // x: an iterable // fn: compare function (a, b)
const iterable = require('extra-iterable'); var x = [1, 2, -3, -4]; iterable.max(x); // 2 iterable.max(x, (a, b) => Math.abs(a) - Math.abs(b)); // -4