We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Convert an iterator to iterable.
Alternatives: from, fromIterator, fromRange, fromInvocation, fromApplication. Similar: isIterator, iterator, from.
function fromIterator(x) // x: an iterator/iterable
const xiterable = require('extra-iterable'); var x = [1, 2].xiterable.values(); var xi = x[Symbol.iterator](); [...xiterable.fromIterator(xi)]; // → [1, 2]