mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
LiteralTransformer rotate and shuffle tests refactoring
This commit is contained in:
@@ -21,6 +21,16 @@ import { MapStorage } from '../MapStorage';
|
||||
|
||||
@injectable()
|
||||
export class StringArrayStorage extends MapStorage <string, IStringArrayStorageItemData> implements IStringArrayStorage {
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
private static readonly minimumRotationAmount: number = 100;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
private static readonly maximumRotationAmount: number = 500;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
@@ -124,7 +134,10 @@ export class StringArrayStorage extends MapStorage <string, IStringArrayStorageI
|
||||
this.stringArrayStorageCallsWrapperName = `${this.options.identifiersPrefix}${baseStringArrayCallsWrapperName}`;
|
||||
|
||||
this.rotationAmount = this.options.rotateStringArray
|
||||
? this.randomGenerator.getRandomInteger(100, 500)
|
||||
? this.randomGenerator.getRandomInteger(
|
||||
StringArrayStorage.minimumRotationAmount,
|
||||
StringArrayStorage.maximumRotationAmount
|
||||
)
|
||||
: 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user