blob: f339afa3ca858e88005079f32d4293c41cb3d225 [file] [log] [blame]
(function() {
var RollingCounter;
RollingCounter = (function() {
function RollingCounter(max, min) {
this.max = max;
this.min = min != null ? min : 1;
this.now = this.min;
}
RollingCounter.prototype.next = function() {
if (!(this.now < this.max)) {
this.now = this.min;
}
return ++this.now;
};
return RollingCounter;
})();
module.exports = RollingCounter;
}).call(this);