(script string)
| 159 | } |
| 160 | |
| 161 | func Run(script string) (value any, err error) { |
| 162 | engine := NewEngine(nil) |
| 163 | return engine.RunString(script) |
| 164 | } |
| 165 | |
| 166 | // if the value is Promise, it will be resolved and return the result. |
| 167 | func resolveResult(value goja.Value) (any, error) { |