math-expression-compiler 4.3.1 → 4.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,12 +5,14 @@
5
5
  [![NPM downloads][badge-npm-downloads]][url-npm]
6
6
  [![NPM Unpacked Size (with version)][badge-npm-unpacked-size]][url-npm]
7
7
 
8
- Math expressions compiled once into a function of plain numbers, in mathjs's numeric language and held to mathjs's recorded answers. A formula is parsed into a tree, the tree is compiled into a function of its variables' values, and that function is called once per row with no parsing or lookup per call.
8
+ Math expressions compiled once into a function of plain numbers, in mathjs's numeric language and held to mathjs's recorded answers.
9
+
10
+ Design notes live in [the specs](https://github.com/Esposter/Esposter/tree/main/openspec/specs/math-expression-compiler).
9
11
 
10
12
  ## Table of Contents
11
13
 
12
14
  - 🚀 [Getting Started](#getting-started)
13
- - 📖 [Documentation](#documentation)
15
+ - 🧩 [Key Exports](#key-exports)
14
16
  - ⚖️ [License](#license)
15
17
 
16
18
  ---
@@ -32,27 +34,16 @@ const evaluate = parseMathExpression("col0 * (1 - col1)").match(
32
34
  evaluate([10, 0.25]); // 7.5
33
35
  ```
34
36
 
37
+ ## <a name="key-exports">🧩 Key Exports</a>
38
+
35
39
  | Export | What it does |
36
40
  | :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------- |
37
- | `parseMathExpression` | A formula to its tree, or a `Result` holding the first error with its position |
38
41
  | `compileMathExpression` | A tree and its variable names to a function of the variables' values, which yields `NaN` where a formula has no numeric answer |
39
42
  | `getMathExpressionNames` | The names a tree reads that it does not assign itself and that are not constants |
40
- | `MathExpressionFunctionMap` | Each function of the language by its mathjs name, as the signatures it takes: argument kinds, arities and computation |
41
43
  | `MathExpressionConstantMap` | The named constants of the language |
42
44
  | `MathExpressionError` | The error a parse returns |
43
-
44
- ## <a name="documentation">📖 Documentation</a>
45
-
46
- We highly recommend you take a look at the [documentation](https://github.com/Esposter/Esposter/tree/main/openspec/specs) to level up.
47
-
48
- ## Commands
49
-
50
- | Command | What it does |
51
- | :--------------- | :--------------------------------------- |
52
- | `pnpm build` | Builds `dist` and regenerates the barrel |
53
- | `pnpm test` | Runs the tests |
54
- | `pnpm lint:fix` | Lints the package and fixes what it can |
55
- | `pnpm typecheck` | Typechecks the package |
45
+ | `MathExpressionFunctionMap` | Each function of the language by its mathjs name, as the signatures it takes: argument kinds, arities and computation |
46
+ | `parseMathExpression` | A formula to its tree, or a `Result` holding the first error with its position |
56
47
 
57
48
  ## <a name="license">⚖️ License</a>
58
49
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "math-expression-compiler",
3
- "version": "4.3.1",
3
+ "version": "4.4.0",
4
4
  "description": "Math expressions compiled once into a function of plain numbers — mathjs's numeric language, held to parity with its recorded answers",
5
5
  "keywords": [
6
6
  "typescript"
@@ -37,16 +37,16 @@
37
37
  "lint": "eslint .",
38
38
  "lint:fix": "eslint --fix .",
39
39
  "test": "vitest",
40
- "typecheck": "tsc"
40
+ "typecheck": "tsrs --fast"
41
41
  },
42
42
  "dependencies": {
43
- "@esposter/shared": "4.3.1",
43
+ "@esposter/shared": "4.4.0",
44
44
  "neverthrow": "^8.2.0"
45
45
  },
46
46
  "devDependencies": {
47
- "@esposter/configuration": "4.3.1",
48
- "@esposter/shared-node": "4.3.1",
49
- "tsdown": "^0.23.1"
47
+ "@esposter/configuration": "4.4.0",
48
+ "@esposter/shared-node": "4.4.0",
49
+ "tsdown": "0.23.2"
50
50
  },
51
- "gitHead": "777a39636b789c13af33ed13370246ccf6dbaf31"
51
+ "gitHead": "e1a416c4b91da69cc2aa259b50a4d656f204d272"
52
52
  }