New option stringArrayWrappersType allows to select a type of the wrappers that are appending by the stringArrayWrappersCount option

This commit is contained in:
sanex
2020-09-15 11:09:22 +03:00
parent 47263a4c1c
commit d86ee4213c
42 changed files with 360 additions and 98 deletions
+4 -2
View File
@@ -2,6 +2,7 @@
import { NO_ADDITIONAL_NODES_PRESET } from '../../src/options/presets/NoCustomNodes';
import { IdentifierNamesGenerator } from '../../src/enums/generators/identifier-names-generators/IdentifierNamesGenerator';
import { StringArrayWrappersType } from '../../src/enums/node-transformers/string-array-transformers/StringArrayWrappersType';
(function () {
const JavaScriptObfuscator: any = require('../../index');
@@ -28,8 +29,9 @@ import { IdentifierNamesGenerator } from '../../src/enums/generators/identifier-
stringArray: true,
transformObjectKeys: true,
stringArrayThreshold: 1,
stringArrayWrappersChainedCalls: false,
stringArrayWrappersCount: 2
stringArrayWrappersChainedCalls: true,
stringArrayWrappersCount: 2,
stringArrayWrappersType: StringArrayWrappersType.Function
}
).getObfuscatedCode();