Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
olamide203
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
3 ms
·
1.
▲
by
olamide203
4y ago
you got me there :)
2.
▲
by
olamide203
4y ago
yeah having to type ${} everywhere makes the code a little bit messy.
3.
▲
by
olamide203
4y ago
I'm glad you find it useful. thanks for the feedback
4.
▲
by
olamide203
4y ago
Nice tip, i'm planning to add an identifier node class so that you can pass a scope with the values to be used during evaluation. Eg. const a = 2; const b = 6; const c = 3 const expression = new Expression('a \ b * c
5.
▲
by
olamide203
4y ago
you can log it to the console if you want to see the Abstract syntax tree of an Expression object
6.
▲
by
olamide203
4y ago
It can also be used in the browser as well as node.js or any other javascript runtime environment
7.
▲
by
olamide203
4y ago
hyoka uses a full recursive descent parser to parse expressions into AST, then evaluates to get the final result. it is very secure for math expressions unlike the eval function which can run javascript code. you can try out a demo here h
8.
▲
Hyoka
(github.com)
34 points
by
olamide203
4y ago
|
19 comments
9.
▲
by
olamide203
4y ago
I created a lightweight and precise math expression parser and evaluator for JavaScript and TypeScript. it can handle complex arithmetic expressions
10.
▲
by
olamide203
4y ago
live site can be found at https://gittz.netify.live
11.
▲
by
olamide203
4y ago
a web application which integrates with the github REST API making it easy for developers to share their projects on twitter
12.
▲
Gittz
(github.com)
1 points
by
olamide203
4y ago
|
2 comments