Script.apex

Script.apex is a library that evaluates Javascript expressions in Apex.

Why Script.apex?

Script.apex help you run JavaScript code in Apex. Basically, it compiles JavaScript code into semantic nodes, which are then evaluated in native Apex. The JavaScript expression parser in Script.apex is porting from jsep.

Expression Parsing

Script.apex parses JavaScript expressions into symantic nodes.

Expression Evaluation

Script.apex evaluates JavaScript expressions to compute the result.

Cached Parsing

Script.apex caches parsed JavaScript expressions to improve performance.

Only One API

To evaluate a JavaScript expression in Script.apex, you really need only one API. That's it.

Script Evaluation

Script.apex evaluates JavaScript expressions to provide dynamic scripting feature to Apex.

Fluent API

Context Evaluation

Script.apex uses variables from context to provide dynamic evaluations.

Collection Support

Symantic Node

Script.apex creates parsed symantic nodes right at your disposal.

Function Composition