All files / src/dom domtokenlist.ts

100% Statements 7/7
100% Branches 2/2
100% Functions 3/3
100% Lines 7/7
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 211x       32x 23x   9x   32x       3x       22x      
export class DOMTokenList extends Array<string> {
	readonly value: string;
 
	constructor(value: string){
		if (value){
			super(...value.split(' '));
		} else {
			super(0);
		}
		this.value = value;
	}
 
	item(n: number): string {
		return this[n];
	}
 
	contains(token: string): boolean {
		return this.indexOf(token) >= 0;
	}
}