vanzy-protect
Version:
Epic Obfuscator Yeahhh
24 lines (23 loc) • 881 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.propertyDefinition = void 0;
const cfg_1 = require("../config/cfg");
const comment_1 = require("../obfuscate/comment");
const stringObf_1 = require("../obfuscate/stringObf");
const rightExpression_1 = require("./rightExpression");
function propertyDefinition(expr) {
var data = '';
data += '[' + (0, comment_1.comment)(2);
if (expr.computed) {
data += (0, rightExpression_1.rightExpression)(expr.key);
}
else {
data += (0, stringObf_1.stringObf)(expr.key.name, (0, cfg_1.cfg)().transforms.keyObfuscationLevel);
}
data += ']' + (0, comment_1.comment)(3);
if (expr.value) {
data += '=' + (0, comment_1.comment)(3) + (0, rightExpression_1.rightExpression)(expr.value);
}
return data;
}
exports.propertyDefinition = propertyDefinition;