silentmatt / expr-eval

Mathematical expression evaluator in JavaScript
http://silentmatt.com/javascript-expression-evaluator/
MIT License
1.18k stars 239 forks source link

How to transform object in mapper function #255

Closed VincentdeWit94 closed 3 years ago

VincentdeWit94 commented 3 years ago

Would it be possible to create a mapper function that returns a new object with new values? Like we would do in JS:

.map((d) => ({a: d.alpha, b: d.beta})); Which would return: { a: 'alpha_val', b: 'beta_val' }

Thanks!

silentmatt commented 3 years ago

Duplicate of #254.