forked from javascript-obfuscator/javascript-obfuscator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStringArrayRule.ts
More file actions
31 lines (27 loc) · 1000 Bytes
/
Copy pathStringArrayRule.ts
File metadata and controls
31 lines (27 loc) · 1000 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import { TOptionsNormalizerRule } from '../../types/options/TOptionsNormalizerRule';
import { IOptions } from '../../interfaces/options/IOptions';
import { StringArrayEncoding } from '../../enums/node-transformers/string-array-transformers/StringArrayEncoding';
/**
* @param {IOptions} options
* @returns {IOptions}
*/
export const StringArrayRule: TOptionsNormalizerRule = (options: IOptions): IOptions => {
if (!options.stringArray) {
options = {
...options,
stringArray: false,
stringArrayCallsTransform: false,
stringArrayCallsTransformThreshold: 0,
stringArrayEncoding: [
StringArrayEncoding.None
],
stringArrayIndexShift: false,
stringArrayRotate: false,
stringArrayShuffle: false,
stringArrayWrappersChainedCalls: false,
stringArrayWrappersCount: 0,
stringArrayThreshold: 0
};
}
return options;
};