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