|
@@ -98,7 +98,7 @@ export abstract class NodeObfuscator implements INodeObfuscator {
|
|
*/
|
|
*/
|
|
protected replaceLiteralValueByUnicodeValue (nodeValue: string): string {
|
|
protected replaceLiteralValueByUnicodeValue (nodeValue: string): string {
|
|
let value: string = nodeValue,
|
|
let value: string = nodeValue,
|
|
- replaceByUnicodeArrayFlag: boolean = Math.random() > this.options['unicodeArrayThreshold'];
|
|
|
|
|
|
+ replaceByUnicodeArrayFlag: boolean = Math.random() <= this.options['unicodeArrayThreshold'];
|
|
|
|
|
|
if (this.options['encodeUnicodeLiterals'] && replaceByUnicodeArrayFlag) {
|
|
if (this.options['encodeUnicodeLiterals'] && replaceByUnicodeArrayFlag) {
|
|
value = new Buffer(encodeURI(value)).toString('base64');
|
|
value = new Buffer(encodeURI(value)).toString('base64');
|