UNPKG

iteragain

Version:

Javascript Iterable/Iterator/Generator-function utilities.

13 lines 520 B
import RangeIterator from './internal/RangeIterator'; /** * Creates an infinite iterator that returns numbers starting from `start` with `step` added to each iteration. * @param start The number to start from (default: 0). * @param step The number to add to each iteration (default: 1) */ export function count(start, step) { if (start === void 0) { start = 0; } if (step === void 0) { step = 1; } return new RangeIterator(start, Infinity, step); } export default count; //# sourceMappingURL=count.js.map