UNPKG

iteragain

Version:

Javascript Iterable/Iterator/Generator-function utilities.

11 lines 326 B
import toIterator from './toIterator'; /** Consumes the input iterator and returns the number of values/items in it. */ export function length(arg) { let result = 0; const it = toIterator(arg); while (!it.next().done) result++; return result; } export default length; //# sourceMappingURL=length.js.map