mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
dev
This commit is contained in:
Vendored
+7
-7
@@ -6,16 +6,16 @@ class OptionsNormalizer {
|
||||
return normalizedOptions;
|
||||
}
|
||||
static unicodeArrayRule(options) {
|
||||
const disabledUnicodeArrayOptions = {
|
||||
encodeUnicodeLiterals: false,
|
||||
rotateUnicodeArray: false,
|
||||
unicodeArray: false,
|
||||
wrapUnicodeArrayCalls: false
|
||||
};
|
||||
if (!options['unicodeArray']) {
|
||||
Object.assign(options, disabledUnicodeArrayOptions);
|
||||
Object.assign(options, OptionsNormalizer.DISABLED_UNICODE_ARRAY_OPTIONS);
|
||||
}
|
||||
return options;
|
||||
}
|
||||
}
|
||||
OptionsNormalizer.DISABLED_UNICODE_ARRAY_OPTIONS = {
|
||||
encodeUnicodeLiterals: false,
|
||||
rotateUnicodeArray: false,
|
||||
unicodeArray: false,
|
||||
wrapUnicodeArrayCalls: false
|
||||
};
|
||||
exports.OptionsNormalizer = OptionsNormalizer;
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
import { IOptions } from "./interfaces/IOptions";
|
||||
|
||||
export class OptionsNormalizer {
|
||||
public static DISABLED_UNICODE_ARRAY_OPTIONS: IOptions = {
|
||||
encodeUnicodeLiterals: false,
|
||||
rotateUnicodeArray: false,
|
||||
unicodeArray: false,
|
||||
wrapUnicodeArrayCalls: false
|
||||
};
|
||||
|
||||
public static normalize (options: IOptions): IOptions {
|
||||
let normalizedOptions: IOptions = Object.assign({}, options);
|
||||
|
||||
@@ -14,15 +21,8 @@ export class OptionsNormalizer {
|
||||
* @returns {IOptions}
|
||||
*/
|
||||
private static unicodeArrayRule (options: IOptions): IOptions {
|
||||
const disabledUnicodeArrayOptions: IOptions = {
|
||||
encodeUnicodeLiterals: false,
|
||||
rotateUnicodeArray: false,
|
||||
unicodeArray: false,
|
||||
wrapUnicodeArrayCalls: false
|
||||
};
|
||||
|
||||
if (!options['unicodeArray']) {
|
||||
Object.assign(options, disabledUnicodeArrayOptions);
|
||||
Object.assign(options, OptionsNormalizer.DISABLED_UNICODE_ARRAY_OPTIONS);
|
||||
}
|
||||
|
||||
return options;
|
||||
|
||||
Reference in New Issue
Block a user