mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
Support for class static blocks
This commit is contained in:
+9
-7
@@ -1,18 +1,20 @@
|
||||
'use strict';
|
||||
|
||||
import { readFileAsString } from '../helpers/readFileAsString';
|
||||
|
||||
(function () {
|
||||
const JavaScriptObfuscator: any = require('../../index');
|
||||
const code: string = readFileAsString(__dirname + '/../functional-tests/javascript-obfuscator/fixtures/custom-nodes-identifier-names-collision.js');
|
||||
const code: string = `
|
||||
class Foo {
|
||||
static {
|
||||
let abc = 2;
|
||||
abc = 3;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
let obfuscationResult = JavaScriptObfuscator.obfuscate(
|
||||
code,
|
||||
{
|
||||
identifierNamesGenerator: 'mangled',
|
||||
compact: false,
|
||||
stringArray: true,
|
||||
seed: 429105580
|
||||
compact: false
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user