iteragain
Version:
Javascript Iterable/Iterator/Generator-function utilities.
14 lines • 561 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.count = count;
const RangeIterator_1 = require("./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)
*/
function count(start = 0, step = 1) {
return new RangeIterator_1.default(start, Infinity, step);
}
exports.default = count;
//# sourceMappingURL=count.js.map