- Notifications
You must be signed in to change notification settings - Fork 1
from
Subhajit Sahu edited this page Feb 3, 2021 · 25 revisions
Convert an iterable-like to iterable.
Alternatives: from, fromIterator, fromRange, fromInvocation, fromApplication.
Similar: isIterator, iterator, from.
function from(x) // x: an iterator/iterableconst xiterable = require('extra-iterable'); var x = [1, 2].xiterable.values(); var xi = x[Symbol.iterator](); [...xiterable.from(xi)]; // → [1, 2]