node:vm

Node's script and context APIs, with limited module classes.

node:vm matches Node’s Script, createContext, compileFunction, and runIn*Context APIs.

Differences from Node

  • A context shares intrinsics with the host realm; it is not a security boundary.
  • SourceTextModule emits an ExperimentalWarning and does not support full linking and evaluation.