nodeVmMod

object nodeVmMod
class Object
trait Matchable
class Any

Type members

Classlikes

@JSImport("node:vm", "Script") @native @JSType
class Script extends Script

Value members

Concrete methods

@inline
def compileFunction(code: String): Function
@inline
def compileFunction(code: String, params: Array[String]): Function
@inline
def compileFunction(code: String, params: Array[String], options: CompileFunctionOptions): Function
@inline
def compileFunction(code: String, params: Unit, options: CompileFunctionOptions): Function
@inline
@inline
def createContext(sandbox: Context): Context
@inline
@inline
def createContext(sandbox: Unit, options: CreateContextOptions): Context
@inline
def isContext(sandbox: Context): Boolean
@inline

Measure the memory known to V8 and used by the current execution context or a specified context.

Measure the memory known to V8 and used by the current execution context or a specified context.

The format of the object that the returned Promise may resolve with is specific to the V8 engine and may change from one version of V8 to the next.

The returned result is different from the statistics returned by v8.getHeapSpaceStatistics() in that vm.measureMemory() measures the memory reachable by V8 from a specific context, while v8.getHeapSpaceStatistics() measures the memory used by an instance of V8 engine, which can switch among multiple contexts that reference objects in the heap of one engine.

@inline
@inline
def runInContext(code: String, contextifiedSandbox: Context): Any
@inline
def runInContext(code: String, contextifiedSandbox: Context, options: RunningScriptOptions): Any
@inline
def runInContext(code: String, contextifiedSandbox: Context, options: String): Any
@inline
def runInNewContext(code: String): Any
@inline
def runInNewContext(code: String, sandbox: Context): Any
@inline
def runInNewContext(code: String, sandbox: Context, options: RunningScriptOptions): Any
@inline
def runInNewContext(code: String, sandbox: Context, options: String): Any
@inline
def runInNewContext(code: String, sandbox: Unit, options: RunningScriptOptions): Any
@inline
def runInNewContext(code: String, sandbox: Unit, options: String): Any
@inline
def runInThisContext(code: String): Any
@inline
def runInThisContext(code: String, options: RunningScriptOptions): Any
@inline
def runInThisContext(code: String, options: String): Any

Concrete fields

@JSImport("node:vm") @native
val ^: Any