UNPKG

@nodesecure/js-x-ray

Version:
30 lines 850 B
// Import Internal Dependencies import { isCallExpression, joinArrayExpression } from "../estree/index.js"; import { walkEnter } from "../walker/index.js"; export class Deobfuscate { name = "deobfuscate"; #withCallExpression(node) { const value = joinArrayExpression(node); if (value !== null) { return { type: "Literal", value, raw: value }; } return void 0; } walk(body) { const self = this; walkEnter(body, function walk(node) { if (Array.isArray(node)) { return; } if (isCallExpression(node)) { this.replaceAndSkip(self.#withCallExpression(node)); } }); return body; } } //# sourceMappingURL=deobfuscate.js.map