You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow disabling the Pro advertisement and respect log: false #1448
Is your feature request related to a problem? Please describe.
When JavaScriptObfuscator.obfuscate() is called in an interactive terminal, it may print an advertisement for JavaScript Obfuscator Pro:
[javascript-obfuscator] 🛡️ JavaScript Obfuscator Pro is now available...
The advertisement is printed even when logging has been explicitly disabled:
constJavaScriptObfuscator=require("javascript-obfuscator");JavaScriptObfuscator.obfuscate("const value = 1;",{log: false});
As a library, javascript-obfuscator should not write promotional content to stdout after the caller has explicitly requested no logging. This can pollute build output and interfere with structured or captured logs.
Describe the solution you'd like
At minimum, the advertisement should respect the existing log: false option and produce no output when logging is disabled.
It would also be useful to provide a dedicated opt-out for users who want normal diagnostic logging without promotional messages, for example:
{log: true,advertisement: false}
Describe alternatives you've considered
The advertisement can currently be suppressed indirectly by:
setting a recognized CI environment variable such as CI=1;
running with a non-TTY stdout;
waiting until the internal display counter reaches its limit.
However, these are not explicit or discoverable opt-out mechanisms.
Setting CI=1 may change the behavior of unrelated tools in the same build process, redirecting stdout changes output handling, and the display counter resets after its configured period.
Additional context
The advertisement was introduced in v5.0.1 and is still present in v5.6.0.
Internally, the advertisement is emitted through logger.advertise(), which bypasses the existing log option. Therefore, log: false suppresses normal obfuscator messages but not the promotional message.
Activity
sanex3339 commentedon Sep 8, 2026
Released as the
advertisementoption in 5.7.0.So set it as