Skip to content
wolfram77 edited this page Apr 1, 2020 · 25 revisions

Converts an iterator to iterable.

Similar: from, iterator.

iterable.from(x);
// x: an iterable
const iterable = require('extra-iterable');

iterable.from([1, 2]);
// [1, 2]

iterable.from(new Set([1, 2]));
// Set(2) {1, 2}

iterable.from([1, 2].values());
// [1, 2]

references

Clone this wiki locally