-
Notifications
You must be signed in to change notification settings - Fork 1
isIterator
Subhajit Sahu edited this page Feb 3, 2021
·
18 revisions
Check if value is an iterator.
Alternatives: is, isList, isIterator, isOnce, isMany.
Similar: isIterator, iterator, from.
function isIterator(v)
// v: a value
const xiterable = require('extra-iterable');
var x = [1, 2];
xiterable.isIterator(x);
// → false
xiterable.isIterator(x[Symbol.iterator]());
// → true
xiterable.isIterator(x.xiterable.values());
// → true