diff --git a/lib/vm.js b/lib/vm.js index 1463e17..0b71f0b 100644 --- a/lib/vm.js +++ b/lib/vm.js @@ -44,6 +44,9 @@ const { const { VMScript } = require('./script'); +const { + inspect +} = require('util'); const objectDefineProperties = Object.defineProperties; @@ -365,6 +368,8 @@ class VM extends EventEmitter { _allowAsync: {__proto__: null, value: allowAsync} }); + this.readonly(inspect); + // prepare global sandbox if (sandbox) { this.setGlobals(sandbox);