iteragain
Version:
Javascript Iterable/Iterator/Generator-function utilities.
11 lines • 448 B
JavaScript
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 = 0, step = 1) {
return new RangeIterator(start, Infinity, step);
}
export default count;
//# sourceMappingURL=count.js.map