Comparing NodeJS VM module and VM2 module for running untrusted runtime-code on server.
NodeJs VM Module: https://nodejs.org/api/vm.html
VM2 module: https://www.npmjs.com/package/vm2
Comparison of Performance and Usage is done here. Feel free to clone or download or fork for further improvement or as a headstart for starting the usage and checking out its feasibilty for personal or commercial usage.
Node Version: 8.X VM2: 3.8.3