-
Notifications
You must be signed in to change notification settings - Fork 1
iterator
Subhajit Sahu edited this page Feb 3, 2021
·
17 revisions
Get iterator of an iterable.
Similar: isIterator, iterator, from.
function iterator(x)
// x: an iterable
const xiterable = require('extra-iterable');
xiterable.iterator([1, 2]);
// Object [Array Iterator] {}
xiterable.iterator(new xiterable.Set([1, 2]));
// → [Set Iterator] { 1, 2 }