SourceTextModule - Node documentation
class SourceTextModule
extends Module
Unstable

Usage

import { SourceTextModule } from "node:vm";

This feature is only available with the --experimental-vm-modules command flag enabled.

The vm.SourceTextModule class provides the Source Text Module Record as defined in the ECMAScript specification.

Constructors

new
SourceTextModule(code: string, options?: SourceTextModuleOptions)

Creates a new SourceTextModule instance.