Skip to content

Commit d17e752

Browse files
authored
Restructure README documentation sections (#40)
* Restructure README documentation sections
1 parent ee8f26d commit d17e752

1 file changed

Lines changed: 15 additions & 11 deletions

File tree

README.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ Expression Evaluator
55

66
## Description
77

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.
119

1210
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.
1311

@@ -30,6 +28,14 @@ console.log(expr.evaluate({ x: 3 })); // 7
3028
Parser.evaluate('6 * x', { x: 7 }); // 42
3129
```
3230

31+
## Playground Example
32+
33+
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+
3339
## Documentation
3440

3541
### For Expression Writers
@@ -75,14 +81,6 @@ If you're integrating expr-eval into your project:
7581
- **Object Construction** - Create objects and arrays in expressions
7682
- **Language Service** - IDE integration with completions, hover info, and highlighting
7783

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-
8684
## Running Tests
8785

8886
```bash
@@ -135,6 +133,12 @@ mkdocs build
135133

136134
The static site will be generated in the `site/` directory.
137135

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+
138142
## License
139143

140144
See [LICENSE.txt](LICENSE.txt) for license information.

0 commit comments

Comments
 (0)