Skip to main content
Module

x/enzastdlib/realm/evaluate.ts>evaluateModule

enzastdlib is a set of TypeScript modules that follow a common design API philosophy aiming at sane defaults and ease-of-use targeting the Deno TypeScript runtime.
Latest
function evaluateModule
import { evaluateModule } from "https://deno.land/x/enzastdlib@v0.0.4/realm/evaluate.ts";

Evaluates code in a sandbox environment with the specified options.

WARNING: The sandbox environment works by setting a blocklist of default Deno globals to undefined when executed. It can be escaped if the blocklist is not updated when members are added in newer Deno versions.

Type Parameters

optional
Exports = unknown
optional
GlobalThisType = unknown

Parameters

code: string
optional
options: EvaluateModuleOptions<GlobalThisType> = [UNSUPPORTED]