You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-11Lines changed: 15 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,9 +5,7 @@ Expression Evaluator
5
5
6
6
## Description
7
7
8
-
**This is a modern TypeScript port of the expr-eval library, completely rewritten with contemporary build tools and development practices.** Originally based on [expr-eval 2.0.2](http://silentmatt.com/javascript-expression-evaluator/), this version has been restructured with a modular architecture, TypeScript support, and comprehensive testing using Vitest.
9
-
10
-
Parses and evaluates mathematical expressions. It's a safer and more math-oriented alternative to using JavaScript's `eval` function for mathematical expressions.
8
+
A versatile expression evaluation library that goes beyond mathematical expressions. It parses and evaluates expressions that can manipulate strings, objects, and arrays, providing a safer alternative to JavaScript's `eval` function.
11
9
12
10
It has built-in support for common math operators and functions. Additionally, you can add your own JavaScript functions. Expressions can be evaluated directly, or compiled into native JavaScript functions.
Try out the expression evaluator and its language server capabilities directly in your browser at the [Playground](https://pro-fa.github.io/expr-eval/). The playground provides an interactive environment with:
34
+
- Live expression evaluation
35
+
- Code completions and IntelliSense
36
+
- Syntax highlighting
37
+
- Hover information for functions and variables
38
+
33
39
## Documentation
34
40
35
41
### For Expression Writers
@@ -75,14 +81,6 @@ If you're integrating expr-eval into your project:
75
81
-**Object Construction** - Create objects and arrays in expressions
76
82
-**Language Service** - IDE integration with completions, hover info, and highlighting
77
83
78
-
## Playground Example
79
-
80
-
Try out the expression evaluator and its language server capabilities directly in your browser at the [Playground](https://pro-fa.github.io/expr-eval/). The playground provides an interactive environment with:
81
-
- Live expression evaluation
82
-
- Code completions and IntelliSense
83
-
- Syntax highlighting
84
-
- Hover information for functions and variables
85
-
86
84
## Running Tests
87
85
88
86
```bash
@@ -135,6 +133,12 @@ mkdocs build
135
133
136
134
The static site will be generated in the `site/` directory.
137
135
136
+
## Origins
137
+
138
+
This library was originally based on [expr-eval 2.0.2](http://silentmatt.com/javascript-expression-evaluator/), but has been restructured with a modular architecture, TypeScript support, and comprehensive testing using Vitest.
139
+
140
+
While the original expr-eval was focused on mathematical expressions, this library aims to be a tool for evaluating expressions that can manipulate strings, objects, and arrays.
141
+
138
142
## License
139
143
140
144
See [LICENSE.txt](LICENSE.txt) for license information.
0 commit comments