Is it possible to call an expression-based canonical transform from a custom JS transform function?

#1

I have a canonical transform type with fields defined as expressions, but it also has some fields with more complicated logic that necessitate a custom JS transform function. Can I invoke the expression-based field transforms from my custom JS transform?

Actually, the more complicated fields are added by a remix, and I would like to avoid having to duplicate the entire transform in JS.

0 Likes

#2

I guess the question really is, can you evaluate expression on Obj? Currently there is a way to evaluate expressions using ExprObj type. However this requires two steps instead of a simple evaluation.

In order to solve this there will be a function called “eval” on any c3 Obj and will support executing any c3 expression.

0 Likes

#3

@rohit.sureka do you have an example of this that I can use?

0 Likes