We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Get values except last.
Similar: head, tail, init, last.
function init(x) // x: an iterable
const xiterable = require('extra-iterable'); [...xiterable.init([1, 2, 3])]; // → [1, 2] [...xiterable.init([1])]; // → []