Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
chain-able-lego / dist / fromArrayToInfiniteIterator.js
Size: Mime:
"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