In-browser calculator #1682
Replies: 3 comments 4 replies
-
Another thing to mention is that mathjs also works with unit conversion :D |
Beta Was this translation helpful? Give feedback.
-
it looks cool but there are other tools already. searching both "2 MiB to KiB" and (2+2)*123 to Google or DuckDuckGo shows the results. |
Beta Was this translation helpful? Give feedback.
-
With mathjs, I do worry a bit about security. They have a security guide which says it:
...which means they're compiling math expressions into JS code. If you could trick the library into generating malicious JS somehow, it could then be evaluated, and the UI process of the browser has node integration enabled, so it has full access to the user's computer. I wonder if there's a simpler math parser we could use that would be safer? |
Beta Was this translation helpful? Give feedback.
-
This is just an idea I had, inspired by some Android launchers. An inline calculator that will display the result along with search suggestions, places and instant answers. This way you just type the calculation and receive the result which you can copy by just clicking on it.
Demo:
calc.mov
It uses mathjs to evaluate the expressions and avoid using any eval.
Branch to try it out
Beta Was this translation helpful? Give feedback.
All reactions