mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
New option: stringArrayIntermediateCalls sets the passed amount of intermediate variables for the string array
This commit is contained in:
+9
-5
@@ -1,24 +1,28 @@
|
||||
'use strict';
|
||||
|
||||
import { NO_ADDITIONAL_NODES_PRESET } from '../../src/options/presets/NoCustomNodes';
|
||||
import { StringArrayEncoding } from '../../src/enums/StringArrayEncoding';
|
||||
|
||||
(function () {
|
||||
const JavaScriptObfuscator: any = require('../../index');
|
||||
|
||||
let obfuscatedCode: string = JavaScriptObfuscator.obfuscate(
|
||||
`
|
||||
var string1 = '👋🏼';
|
||||
const foo = 'foo';
|
||||
const bar = 'bar';
|
||||
const baz = 'baz';
|
||||
|
||||
console.log(string1);
|
||||
console.log(foo, bar, baz);
|
||||
`,
|
||||
{
|
||||
...NO_ADDITIONAL_NODES_PRESET,
|
||||
compact: false,
|
||||
stringArray: true,
|
||||
stringArrayThreshold: 1,
|
||||
splitStrings: true,
|
||||
splitStringsChunkLength: 1,
|
||||
unicodeEscapeSequence: true
|
||||
stringArrayIntermediateCalls: 2,
|
||||
stringArrayEncoding: [
|
||||
StringArrayEncoding.Rc4
|
||||
]
|
||||
}
|
||||
).getObfuscatedCode();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user