Run JavaScript
js.eval(source, options) runs a short JavaScript snippet in an isolated environment. Java passes options and reads results as JSON strings; Python uses self.js.eval and QuickJS uses await js.eval.
Options
md5X is built in. The result is the JSON value of the last expression; promises are not accepted. The environment provides no networking, DOM or module imports, and is disposed after completion, timeout or cancellation. All three languages need the QuickJS module.
Samples
Tip
Use this for signatures, decryption or short parsing snippets. When you need full Node.js packages, use Node.js loading.