The splitStrings option now correctly splits strings inside objects

This commit is contained in:
sanex3339
2019-12-29 13:29:08 +03:00
parent 8a0b182161
commit 3ba3fff62c
10 changed files with 24 additions and 19 deletions
+6 -4
View File
@@ -6,16 +6,18 @@ import { NO_ADDITIONAL_NODES_PRESET } from '../../src/options/presets/NoCustomNo
let obfuscatedCode: string = JavaScriptObfuscator.obfuscate(
`
var n = 'abcefgi';
function hi() {
console.log("Hello World!");
}
hi();
`,
{
...NO_ADDITIONAL_NODES_PRESET,
compact: false,
splitStrings: true,
splitStringsChunkLength: 4,
stringArray: true,
stringArrayThreshold: 1,
seed: 1
controlFlowFlattening: true,
controlFlowFlatteningThreshold: 1
}
).getObfuscatedCode();