jsoverson / javascript-deobfuscation-AMA

General questions about deobfuscating JavaScript
13 stars 0 forks source link

Issue using refactor-utilities-common with refactor-session-chainable #3

Closed ghost closed 3 years ago

ghost commented 3 years ago

Hey Jarrod,

I am trying to use the refactor-utilities-common package with the refactor session however I am running into issues.

Code:

const { RefactorSession, refactor } = require("shift-refactor"); const commonMethods = require('refactor-plugin-common'); const fileContents = require("fs").readFileSync("test_tick.js", { encoding: "utf8" }); let ast = parseScript(fileContents); const $script = refactor(ast, commonMethods);

Error:

Object.assign(this, plugin(this)); ^

TypeError: plugin is not a function