From 3c8030b38b469c833b45332681b09509e77835e8 Mon Sep 17 00:00:00 2001 From: sanex3339 Date: Thu, 9 Jun 2016 21:30:55 +0300 Subject: [PATCH] dev --- dist/index.js | 17 ++--------------- .../VariableDeclarationObfuscator.ts | 11 ++++------- 2 files changed, 6 insertions(+), 22 deletions(-) diff --git a/dist/index.js b/dist/index.js index d99441ba..d5fc932a 100644 --- a/dist/index.js +++ b/dist/index.js @@ -37,18 +37,6 @@ module.exports = /******/ // identity function for calling harmory imports with the correct context /******/ __webpack_require__.i = function(value) { return value; }; -/******/ // define getter function for harmory exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ }; - -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; - /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; @@ -2366,9 +2354,8 @@ module.exports = value: function replaceVariableCalls(variableDeclarationNode, variableParentNode) { var _this3 = this; - var scopeNode = void 0; - scopeNode = variableDeclarationNode.kind === 'var' ? NodeUtils_1.NodeUtils.getBlockScopeOfNode(variableDeclarationNode) : variableParentNode; - var isNodeAfterVariableDeclaratorFlag = false; + var scopeNode = variableDeclarationNode.kind === 'var' ? NodeUtils_1.NodeUtils.getBlockScopeOfNode(variableDeclarationNode) : variableParentNode, + isNodeAfterVariableDeclaratorFlag = false; estraverse.replace(scopeNode, { enter: function enter(node, parentNode) { var functionNodes = [NodeType_1.NodeType.ArrowFunctionExpression, NodeType_1.NodeType.FunctionDeclaration, NodeType_1.NodeType.FunctionExpression]; diff --git a/src/node-obfuscators/VariableDeclarationObfuscator.ts b/src/node-obfuscators/VariableDeclarationObfuscator.ts index dcd75321..05d94e9a 100644 --- a/src/node-obfuscators/VariableDeclarationObfuscator.ts +++ b/src/node-obfuscators/VariableDeclarationObfuscator.ts @@ -64,13 +64,10 @@ export class VariableDeclarationObfuscator extends NodeObfuscator { * @param variableParentNode */ private replaceVariableCalls (variableDeclarationNode: IVariableDeclarationNode, variableParentNode: INode): void { - let scopeNode: INode; - - scopeNode = variableDeclarationNode.kind === 'var' ? NodeUtils.getBlockScopeOfNode( - variableDeclarationNode - ) : variableParentNode; - - let isNodeAfterVariableDeclaratorFlag: boolean = false; + let scopeNode: INode = variableDeclarationNode.kind === 'var' ? NodeUtils.getBlockScopeOfNode( + variableDeclarationNode + ) : variableParentNode, + isNodeAfterVariableDeclaratorFlag: boolean = false; estraverse.replace(scopeNode, { enter: (node: INode, parentNode: INode): any => {