-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
Description
I want to extract all the variables from a formula.
I am traversing through the Expression Tree using the traverse method to get all the SymbolNodes.
The problem is that the functions like sqrt, pi, sin are considered as SymbolNode.
Is there any way I can ignore all those values? Right now I am doing the following to differentiate them:
typeof math[node.name] === 'function' ? 'This is function' : 'This is symbol'
The pi is not a function either.
I want to do this so that I can ask the user for those values and then set the scope using the user input to evaluate the formula.
Is there any better way to handle this?
Reactions are currently unavailable