Added mangleProperties to the runtime tests. Readme update

This commit is contained in:
sanex3339
2020-06-07 00:36:30 +03:00
parent 095ccc330a
commit 5cd063fe92
4 changed files with 16 additions and 7 deletions
+5
View File
@@ -1,5 +1,10 @@
Change Log
v1.1.0
---
* **New option:** `mangleProperties` enables mangling property names
v1.0.1
---
* Fixed .d.ts typings. https://github.com/javascript-obfuscator/javascript-obfuscator/issues/623
+3 -3
View File
@@ -667,13 +667,13 @@ Enables logging of the information to the console.
### `mangleProperties`
Type: `boolean` Default: `false`
##### :warning: this option will break your code in most cases. Enable it only if you know what it does!
##### :warning: this option **WILL** break your code in most cases. Enable it only if you know what it does!
Enables mangling property names.
Generated names are being controlled by [`identifierNamesGenerator`](#identifierNamesGenerator) option.
To set format of renamed property names use [`identifierNamesGenerator`](#identifierNamesGenerator) option.
It is possible to control which properties will be mangled with [`reservedNames`](#reservedNames) option.
To control which properties will be renamed use [`reservedNames`](#reservedNames) option.
### `renameGlobals`
Type: `boolean` Default: `false`
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "javascript-obfuscator",
"version": "1.0.1",
"version": "1.1.0",
"description": "JavaScript obfuscator",
"keywords": [
"obfuscator",
@@ -25,6 +25,7 @@ describe('JavaScriptObfuscator runtime eval', function () {
debugProtection: true,
disableConsoleOutput: true,
domainLock: ['obfuscator.io'],
mangleProperties: true,
reservedNames: ['generate', 'sha256'],
rotateStringArray: true,
selfDefending: true,
@@ -67,7 +68,8 @@ describe('JavaScriptObfuscator runtime eval', function () {
code,
{
...baseOptions,
...options
...options,
mangleProperties: false
}
).getObfuscatedCode();
@@ -178,7 +180,8 @@ describe('JavaScriptObfuscator runtime eval', function () {
code,
{
...baseOptions,
...options
...options,
mangleProperties: false
}
).getObfuscatedCode();
@@ -248,7 +251,8 @@ describe('JavaScriptObfuscator runtime eval', function () {
{
...baseOptions,
...options,
...webpackBootstrapOptions
...webpackBootstrapOptions,
reservedNames: ['^foo$']
}
).getObfuscatedCode();