Replies: 1 comment
-
|
There are no separate thing like global functions in expressions, just scopes. So you do have to add functions to a scopes to access them, but this is the same as any variable. Scopes can be object though, and property lookup naturally uses the prototype chain, so you can put globals on an object, then extend other scopes from that. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
@justinfagnani
We need to support many custom built functions and need to register them as global functions so they can be used in expressions without any prefix. As of now, we are assigning all of those functions to context var object each time expr needs to be evaluated.
Is there a better or efficient approach to register global functions once, so we don't have to copy functions each time a formula needs to be evaluated?
Beta Was this translation helpful? Give feedback.
All reactions