INSECURE three-argument evaluate function. The evaluated code will have full access to the globals, which is far more authority than you really want to give that code.
You should be using Secure ECMAScript or Realms
evaluate with security in mind.
This repository contains a stub implementation of evaluate. If you really need it, you will know, and you are on your own.