All files / src/storages/string-array StringArrayStorage.ts

100% Statements 6/6
100% Branches 0/0
100% Functions 1/1
100% Lines 6/6
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 211x 1x   1x         526x             526x 5983x        
import { ArrayStorage } from '../ArrayStorage';
import { Utils } from '../../Utils';
 
export class StringArrayStorage extends ArrayStorage <string> {
    /**
     * @param rotationValue
     */
    public rotateArray (rotationValue: number): void {
        this.storage = Utils.arrayRotate(this.storage, rotationValue);
    }
 
    /**
     * @returns {string}
     */
    public toString (): string {
        return this.storage.map((value: string) => {
            return `'${value}'`;
        }).toString();
    }
}