UNPKG

vanzy-protect

Version:

Epic Obfuscator Yeahhh

22 lines (21 loc) 881 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.doWhileStatement = void 0; const comment_1 = require("../obfuscate/comment"); const postElseExpr_1 = require("./postElseExpr"); const rightExpression_1 = require("./rightExpression"); const traverse_1 = require("./traverse"); function doWhileStatement(expr) { var data = 'do ' + (0, comment_1.comment)(2); if (expr.body.type === 'BlockStatement') { data += '{' + (0, comment_1.comment)(1) + (0, traverse_1.traverse)(expr.body.body) + ';}'; } else { data += (0, postElseExpr_1.postElseExpr)(expr.body) + ';'; } data += (0, comment_1.comment)(2) + 'while(' + (0, comment_1.comment)(2); data += (0, rightExpression_1.rightExpression)(expr.test); data += (0, comment_1.comment)(3) + ')'; return data; } exports.doWhileStatement = doWhileStatement;