Skip to content

Commit

Permalink
add result stringify
Browse files Browse the repository at this point in the history
  • Loading branch information
SchneeHertz committed Sep 7, 2023
1 parent aca8db6 commit c4b64fe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/vm.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ const context = new vm.createContext(env)

const javaScriptInterpreterPowerful = ({ code }) => {
const script = new vm.Script(code)
return script.runInContext(context)
let result = script.runInContext(context)
return JSON.stringify(result)
}

module.exports = {
Expand Down

0 comments on commit c4b64fe

Please sign in to comment.