UNPKG

vanzy-protect

Version:

Epic Obfuscator Yeahhh

21 lines (20 loc) 807 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.templateString = void 0; const comment_1 = require("../obfuscate/comment"); const stringObf_1 = require("../obfuscate/stringObf"); const rightExpression_1 = require("./rightExpression"); function templateString({ quasis, expressions }) { var data = (0, comment_1.comment)(2); const mapped = quasis.map((i, n) => { var res = (0, stringObf_1.stringObf)(i.value.raw) + (0, comment_1.comment)(3); if (expressions[n]) { res += '+(' + (0, comment_1.comment)(3) + (0, rightExpression_1.rightExpression)(expressions[n]) + ')'; } return res; }); data += mapped.join('+'); data += (0, comment_1.comment)(1); return data; } exports.templateString = templateString;