Skip to content

JSSandbox.eval() method

Home > streplts > JSSandbox > eval

Process, intercepts, converts and safely runs raw string scripts against internal V8 VM layers.

Signature:

eval(code: string): Promise<string | null>;

Parameter

Type

Description

code

string

The string expression or statement sequence script to parse and execute.

Returns:

Promise<string | null>

Inspected formatted data string representation, or null if resolution provides no value.