Use whitelisted Globals from VM2
VM2 is designed to securely execute unknown code in a NodeVM, we'll use their initial safe sandbox then extend it with the language-package.
VM2 is designed to securely execute unknown code in a NodeVM, we'll use their initial safe sandbox then extend it with the language-package.