-
I would like to find out if there is a way to namespace variables passed to the scope so that variables can be accessed using (.) notation. For example: const scope = new Map();
scope.set('Vitals', { Weight: math.unit(70, "kg"), Height: math.unit(1.5, "m")});
const bmiOutput = math.evaluate('Vitals.Weight / Vitals.Height ^ 2', scope); This would be ideal for IDE auto completion in domains where the number of variables is massive (i.e. over 1000 variables). |
Beta Was this translation helpful? Give feedback.
Answered by
josdejong
Jan 22, 2024
Replies: 1 comment 1 reply
-
Dot notation is supported, your code actually just works (except for the JavaScript typos in there) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
simoami
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Dot notation is supported, your code actually just works (except for the JavaScript typos in there)