Repository URL to install this package:
Version:
6.0.4 ▾
|
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* @types (array: Array<any>): Iterator
*/
function fromArrayToInfiniteIterator(list) {
let index = -1;
return {
next() {
index += 1;
if (list.length <= index) {
index = 0;
}
return list[index];
},
};
}
exports.default = fromArrayToInfiniteIterator;
//# sourceMappingURL=fromArrayToInfiniteIterator.js.map