We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Gets values from middle. 🏃 [:vhs:] 📦 🌔
Similar: left, middle, right.
iterable.middle(x, [i], [n]); // x: an iterable // i: start index (0) // n: number of values (1)
const iterable = require('extra-iterable'); var x = [1, 2, 3]; [...iterable.middle(x, 1, 1)]; // [ 2 ] [...iterable.middle(x, 1, 2)]; // [ 2, 3 ]