All files / src/utils sequence-generator.ts

100% Statements 7/7
100% Branches 3/3
100% Functions 2/2
100% Lines 7/7
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17  1x       2x     2x 4x 4x 1x   4x      
/// Auto incrementing class that maintains its current position
export class SequenceGenerator {
	i: number;
 
	constructor(initialValue: number = 0) {
		this.i = initialValue;
	}
 
	next =  () => {
		this.i++;
		if ( this.i > 255 ) {
			this.i = 1;
		}
		return this.i;
	}
}