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
A parser and evaluator of spreadsheet-like formulas
8
9
</h3>
9
10
10
-
Formula is in its early stages, so it's better to be used cautiously.
11
+
Formula is in its early stages and is not ready for production use.
11
12
12
13
So far we have the following features:
13
14
@@ -18,7 +19,9 @@ So far we have the following features:
18
19
- 2 web functions
19
20
- plus all arithmetic and comparison operators
20
21
21
-
### Installation and usage
22
+
#### Installation and usage
23
+
24
+
##### Rust
22
25
23
26
Add this library to your project with `cargo add formula` or add `formula = "*"` to your `Cargo.toml` file.
24
27
@@ -35,22 +38,35 @@ fn main() -> Result<()> {
35
38
}
36
39
```
37
40
38
-
### What we do not support, yet:
41
+
##### JavaScript
42
+
43
+
Add this library to your project with `npm install formula-wasm` or add `formula-wasm` to your `package.json` file.
44
+
45
+
Use it similar to the following code:
46
+
47
+
```js
48
+
import { parse } from'formula-wasm';
49
+
50
+
constvalue=parse('=UPPER(TRIM(" Hello "))');
51
+
console.assert(value, "HELLO");
52
+
```
53
+
54
+
#### What we do not support, yet:
39
55
40
-
-Support of functions are so limited at the moment, but we would like to add more of them, like Excel functions, Google Sheets functions, and so on
41
-
- At the moment, we don't support table data, so you need to pass values to the formula as arguments by yourself
56
+
-We don't support all existing functions in the world, but we would like to add more of them, like Excel functions, Google Sheets functions, and so on
57
+
- At the moment, we don't support table data. It means you need to extract table data and pass theirs values to this library
42
58
- We do not support simple formulas like `1+1` or as argument like `AND(1>3, 1<3)` or `SUM(2-1, 2)`. Instead, you can use our `F.` functions like `AND(F.GT(1, 3), F.LT(1, 3))` or `SUM(F.SUB(2, 1), 2)`
43
59
- We still do not support parentheses to change the order of operations, but you can use our `F.` functions. So for example instead of `2*(1+1)`, you should use `F.MUL(2, F.ADD(1, 1))`
44
60
45
-
### Contributing
61
+
####Contributing
46
62
47
63
We would love to have your contribution! Please read our [contributing guidelines](CONTRIBUTING.md) to get started.
0 commit comments