mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
Added console.table empty function to ConsoleOutputDisableExpressionTemplate
This commit is contained in:
@@ -5,6 +5,7 @@ v0.21.0
|
||||
* Improved `transformObjectKeys` transformation to cover more cases
|
||||
* Fixed https://github.com/javascript-obfuscator/javascript-obfuscator/issues/406
|
||||
* Fixed https://github.com/javascript-obfuscator/javascript-obfuscator/issues/387
|
||||
* Fixed https://github.com/javascript-obfuscator/javascript-obfuscator/issues/333
|
||||
|
||||
v0.20.4
|
||||
---
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+2
@@ -18,6 +18,7 @@ export function ConsoleOutputDisableExpressionTemplate (): string {
|
||||
c.info = func;
|
||||
c.error = func;
|
||||
c.exception = func;
|
||||
c.table = func;
|
||||
c.trace = func;
|
||||
|
||||
return c;
|
||||
@@ -29,6 +30,7 @@ export function ConsoleOutputDisableExpressionTemplate (): string {
|
||||
that.console.info = func;
|
||||
that.console.error = func;
|
||||
that.console.exception = func;
|
||||
that.console.table = func;
|
||||
that.console.trace = func;
|
||||
}
|
||||
});
|
||||
|
||||
+5
@@ -10,6 +10,7 @@ describe('ConsoleOutputDisableExpressionNode', () => {
|
||||
const consoleLogRegExp: RegExp = /_0x([a-f0-9]){4,6}\['console'\]\['log'\] *= *_0x([a-f0-9]){4,6};/u;
|
||||
const consoleErrorRegExp: RegExp = /_0x([a-f0-9]){4,6}\['console'\]\['error'\] *= *_0x([a-f0-9]){4,6};/u;
|
||||
const consoleWarnRegExp: RegExp = /_0x([a-f0-9]){4,6}\['console'\]\['warn'\] *= *_0x([a-f0-9]){4,6};/u;
|
||||
const consoleTableRegExp: RegExp = /_0x([a-f0-9]){4,6}\['console'\]\['table'\] *= *_0x([a-f0-9]){4,6};/u;
|
||||
|
||||
describe('`disableConsoleOutput` option is set', () => {
|
||||
let obfuscatedCode: string;
|
||||
@@ -37,6 +38,10 @@ describe('ConsoleOutputDisableExpressionNode', () => {
|
||||
it('match #3: should correctly append custom node into the obfuscated code', () => {
|
||||
assert.match(obfuscatedCode, consoleWarnRegExp);
|
||||
});
|
||||
|
||||
it('match #4: should correctly append custom node into the obfuscated code', () => {
|
||||
assert.match(obfuscatedCode, consoleTableRegExp);
|
||||
});
|
||||
});
|
||||
|
||||
describe('`disableConsoleOutput` option isn\'t set', () => {
|
||||
|
||||
Reference in New Issue
Block a user