From 3ca0fcb67a6db8fcffaf55a99b09cd1f56113930 Mon Sep 17 00:00:00 2001 From: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Date: Sun, 21 Jan 2024 03:57:17 -0800 Subject: [PATCH] [node:vm] Add missing `createScript` function --- src/js/node/vm.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/js/node/vm.ts b/src/js/node/vm.ts index 7d2b5aa2cf..48bd60f929 100644 --- a/src/js/node/vm.ts +++ b/src/js/node/vm.ts @@ -9,6 +9,10 @@ function runInContext(code, context, options) { return new Script(code, options).runInContext(context); } +function createScript(code, options) { + return new Script(code, options); +} + function compileFunction() { throwNotImplemented("node:vm compileFunction"); } @@ -46,4 +50,5 @@ export default { Module, SourceTextModule, SyntheticModule, + createScript, };