I
I
Ivanq2015-10-18 12:14:44
JavaScript
Ivanq, 2015-10-18 12:14:44

Customize MathJS for yourself?

Good afternoon!
I downloaded the MathJS library, they advised me from the toaster. Now there was a problem - I want to customize for myself. Wrote a small parser using math.parse(). Everything seems to work, but I need to remove / add operators. How to remove it is clear: I found a line with exports.operators, removed the excess. How to add? And then I noticed - some operators are after the number, some before, some between. And it is not possible to add two-character type operators ||and &&.
I really need help! Maybe someone worked with this library?

PS If anyone is interested, I opened a topic here: ru.stackoverflow.com/questions/459283/%D0%9A%D0%B0...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Keyten, 2015-10-18
@Ivanq

It worked (more precisely, it was played), but it was not necessary to create operators. Only overload existing ones (in fact, the function is overloaded).
I can only suggest that you parse the string yourself before passing it to math.parse.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question