File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -11,17 +11,17 @@ api.vm = require('vm');
1111
1212// Create a hash and turn it into the sandboxed context which will be
1313// the global context of an application
14- let context = { module : { } , console : console } ;
14+ const context = { module : { } , console } ;
1515context . global = context ;
16- let sandbox = api . vm . createContext ( context ) ;
16+ const sandbox = api . vm . createContext ( context ) ;
1717
1818// Read an application source code from the file
19- let fileName = './application.js' ;
19+ const fileName = './application.js' ;
2020api . fs . readFile ( fileName , ( err , src ) => {
2121 // We need to handle errors here
2222
2323 // Run an application in sandboxed context
24- let script = api . vm . createScript ( src , fileName ) ;
24+ const script = api . vm . createScript ( src , fileName ) ;
2525 script . runInNewContext ( sandbox ) ;
2626
2727 // We can access a link to exported interface from sandbox.module.exports
You can’t perform that action at this time.
0 commit comments