deadCodeInjection
. With this option random blocks of dead code will add to the obfuscated code.deadCodeInjectionThreshold
allows to set percentage of nodes that will affected by deadCodeInjection
.mangle
enables mangling of variable names.escapeUnicodeSequence
option now disabled by default.controlFlowFlattening
now affects string literal nodes.rc4
stringArrayEncoding
.escodegen
to escodegen-wallaby
, fixed https://github.com/javascript-obfuscator/javascript-obfuscator/pull/50[email protected]
and [email protected]
support.controlFlowFlattening
allows to enable/disable Control Flow flattening. Control flow flattening is a structure transformation of the source code that hinders program comprehension.controlFlowFlatteningThreshold
allows to set percentage of nodes that will affected by controlFlowFlattening
.es2015
support: correct obfuscation of TemplateLiteral
, ArrayPattern
, AssignmentPattern
nodes.npm
to yarn
internally.Cannot read property 'type' of undefined
error, when RandomGeneratorUtils.getMathRandom()
returned incorrect value 1
.[email protected]
and [email protected]
support.npm
to yarn
internally.controlFlowFlattening
allows to enable/disable Control Flow flattening. Control flow flattening is a structure transformation of the source code that hinders program comprehension.controlFlowFlatteningThreshold
allows to set percentage of nodes that will affected by controlFlowFlattening
.es2015
support: correct obfuscation of TemplateLiteral
, ArrayPattern
, AssignmentPattern
nodes.selfDefending
option now disabled by default.seed
sets seed for random generator. This is useful for creating repeatable results.disableConsoleOutput
option now replaces console.xxx
functions on empty function instead of infinity loop.unicodeArray
option has been renamed to stringArray
.unicodeArrayThreshold
option has been renamed to stringArrayThreshold
.encodeUnicodeArray
option has been renamed to stringArrayEncoding
and now accepts following values: true|false|'base64'|'rc4'
.wrapUnicodeArrayCalls
was removed and now all calls to stringArray
are always wrapped by special wrapper function.unicodeEscapeSequence
allows to enable/disable strings conversion to unicode escape sequence.domainLock
locks the obfuscated source code so it only runs on specific domains and/or sub-domains.sourceMapBaseUrl
sets base url to the source map import url when sourceMapMode: 'separate'
.selfDefendingNode
or consoleOutputNode
now inserted into deepest stack trace function call.Utils.decToHex
methodobfuscate(sourceCode, options)
returns ObfuscationResult
object instead string
. ObfuscationResult
object contains two public methods: getObfuscatedCode()
and getSourceMap()
.javascript-obfuscator
command. See README.md
for available options.sourceMap
enables source map generation for obfuscated code.sourceMapMode
specifies source map generation mode.