Script
Constructors
Properties
When cachedData is supplied to create the vm.Script, this value will be set to either true or false depending on acceptance of the data by V8. Otherwise the value is undefined.
When the script is compiled from a source that contains a source map magic comment, this property will be set to the URL of the source map.
Functions
Creates a code cache that can be used with the Script constructor's cachedData option. Returns a Buffer. This method may be called at any time and any number of times.
Runs the compiled code contained by the vm.Script object within the given contextifiedObject and returns the result. Running code does not have access to local scope.
This method is a shortcut to script.runInContext(vm.createContext(options), options). It does several things at once:
Runs the compiled code contained by the vm.Script within the context of the current global object. Running code does not have access to local scope, but does have access to the current global object.