TomFrost / Jexl

Javascript Expression Language: Powerful context-based expression parser and evaluator
MIT License
566 stars 93 forks source link

Is it possible to get evaluation result synchronously? #30

Closed Alex-Hagen-Thorn-at-Experieco closed 7 years ago

Alex-Hagen-Thorn-at-Experieco commented 7 years ago

Hi,

I need to evaluate an expression, but I need the result immediately, not wrapped into a promise. The evaluator is executed in a synchronous context and I cannot switch to async pattern. All used variables are ready, no promises.

Is this possible with the current version?

If not, are you planning to add this feature? How difficult is it to implement in current architecture, if I decide to add it by myself?

Thank you.

Alex-Hagen-Thorn-at-Experieco commented 7 years ago

Sorry, I did not notice the closed ticket addressing this. Now I see, that is not possible. OK (sigh)...

TomFrost commented 7 years ago

Indeed-- that response is still accurate. Sorry Jexl doesn't fit the synchronous use case!