mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
* Fixed identifier names generations for mangled and dictionary identifier names generators
* Fixed combination of `identifierNamesGenerator: dictionary` and `debugProtection` options * `seed` option now accepts `string` and `number` values
This commit is contained in:
@@ -570,7 +570,7 @@ describe('JavaScriptObfuscator', () => {
|
||||
});
|
||||
|
||||
describe('dictionary identifier names generator', () => {
|
||||
const regExp: RegExp = /var *[ab] *= *0x1; *var *[ab] *= *0x2; *var *[AB] *= *0x3;/;
|
||||
const regExp: RegExp = /var *[abc] *= *0x1; *var *[ABC] *= *0x2; *var *[ABC] *= *0x3;/;
|
||||
|
||||
let obfuscatedCode: string;
|
||||
|
||||
@@ -582,7 +582,7 @@ describe('JavaScriptObfuscator', () => {
|
||||
{
|
||||
...NO_ADDITIONAL_NODES_PRESET,
|
||||
identifierNamesGenerator: IdentifierNamesGenerator.DictionaryIdentifierNamesGenerator,
|
||||
identifiersDictionary: ['a', 'b']
|
||||
identifiersDictionary: ['a', 'b', 'c']
|
||||
}
|
||||
).getObfuscatedCode();
|
||||
});
|
||||
@@ -667,7 +667,7 @@ describe('JavaScriptObfuscator', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('Identifier names collision between base code and appended custom nodes', () => {
|
||||
describe('Identifier names collision between base code and appended string array nodes', () => {
|
||||
const samplesCount: number = 30;
|
||||
|
||||
let areCollisionsExists: boolean = false;
|
||||
|
||||
Reference in New Issue
Block a user