UNPKG

matterbridge-roborock-vacuum-plugin

Version:
19 lines (16 loc) 351 B
export class Sequence { private readonly min: number; private readonly max: number; private current: number; constructor(min: number, max: number) { this.min = min; this.max = max; this.current = min; } next(): number { if (this.current > this.max) { this.current = this.min; } return this.current++; } }