mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
Storages refactoring
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user