Eval

compile (expr: string): (context: {}, local: {}): undefined|T

Compiles a JS expression into a function that can be evaluated with context.

Name Type Default Description
expr string    

compileString (expr: string, isAttribute: boolean): (vars: any): string

Converts an expression string into an executable JS function. It will replace all ${x} type expressions and evaluate them based on a context.

Name Type Default Description
expr string    
isAttribute boolean false  

Copyright © 2024 Mathigon.org