@danielsimonjr/mathts-expression 0.2.2 → 0.2.4

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.
Files changed (2) hide show
  1. package/README.md +22 -0
  2. package/package.json +59 -59
package/README.md ADDED
@@ -0,0 +1,22 @@
1
+ # @danielsimonjr/mathts-expression
2
+
3
+ Expression parser & evaluator for [MathTS](https://github.com/danielsimonjr/mathts).
4
+
5
+ The expression engine for MathTS: a parser (string → AST), an AST node set, a compiler, and an evaluator. Includes a sandbox (`getSafeProperty` / `getSafeMethod`) for safe property access.
6
+
7
+ ## Install
8
+
9
+ ```sh
10
+ npm install @danielsimonjr/mathts-expression
11
+ ```
12
+
13
+ ## What it provides
14
+
15
+ - `createParse` / `createParserClass` / `createParser` — parse to an AST.
16
+ - 16 AST node constructors (`createConstantNode`, `createOperatorNode`, …).
17
+ - `compile` / `createEvaluate` / `compileExpression` — evaluate expressions.
18
+ - Focused re-exports are also published: `@danielsimonjr/mathts-{parser,ast,evaluator}`.
19
+
20
+ ## License
21
+
22
+ MIT (c) Daniel Simon Jr.
package/package.json CHANGED
@@ -1,59 +1,59 @@
1
- {
2
- "name": "@danielsimonjr/mathts-expression",
3
- "version": "0.2.2",
4
- "description": "Expression parser and evaluator for MathTS",
5
- "author": "Daniel Simon Jr.",
6
- "license": "MIT",
7
- "type": "module",
8
- "main": "./dist/index.js",
9
- "module": "./dist/index.js",
10
- "types": "./dist/index.d.ts",
11
- "exports": {
12
- ".": {
13
- "import": "./dist/index.js",
14
- "types": "./dist/index.d.ts"
15
- }
16
- },
17
- "files": [
18
- "dist",
19
- "README.md"
20
- ],
21
- "scripts": {
22
- "build": "tsup src/index.ts --format esm --dts --clean",
23
- "dev": "tsup src/index.ts --format esm --dts --watch",
24
- "test": "vitest run",
25
- "test:watch": "vitest",
26
- "test:coverage": "vitest run --coverage",
27
- "typecheck": "tsc --noEmit",
28
- "lint": "eslint src --ext .ts",
29
- "lint:fix": "eslint src --ext .ts --fix",
30
- "clean": "rm -rf dist",
31
- "build:prod": "tsup src/index.ts --format esm --dts --clean --minify --treeshake"
32
- },
33
- "dependencies": {
34
- "@danielsimonjr/mathts-core": "0.1.3",
35
- "typed-function": "^4.0.0"
36
- },
37
- "devDependencies": {
38
- "@types/node": "^25.5.2",
39
- "tsup": "^8.0.0",
40
- "typescript": "^5.3.0",
41
- "vitest": "^4.1.5"
42
- },
43
- "publishConfig": {
44
- "access": "public"
45
- },
46
- "repository": {
47
- "type": "git",
48
- "url": "https://github.com/danielsimonjr/mathts",
49
- "directory": "expression"
50
- },
51
- "keywords": [
52
- "math",
53
- "typescript",
54
- "expression",
55
- "parser",
56
- "evaluator",
57
- "compiler"
58
- ]
59
- }
1
+ {
2
+ "name": "@danielsimonjr/mathts-expression",
3
+ "version": "0.2.4",
4
+ "description": "Expression parser and evaluator for MathTS",
5
+ "author": "Daniel Simon Jr.",
6
+ "license": "MIT",
7
+ "type": "module",
8
+ "main": "./dist/index.js",
9
+ "module": "./dist/index.js",
10
+ "types": "./dist/index.d.ts",
11
+ "exports": {
12
+ ".": {
13
+ "import": "./dist/index.js",
14
+ "types": "./dist/index.d.ts"
15
+ }
16
+ },
17
+ "files": [
18
+ "dist",
19
+ "README.md"
20
+ ],
21
+ "scripts": {
22
+ "build": "tsup src/index.ts --format esm --dts --clean",
23
+ "dev": "tsup src/index.ts --format esm --dts --watch",
24
+ "test": "vitest run",
25
+ "test:watch": "vitest",
26
+ "test:coverage": "vitest run --coverage",
27
+ "typecheck": "tsc --noEmit",
28
+ "lint": "eslint src --ext .ts",
29
+ "lint:fix": "eslint src --ext .ts --fix",
30
+ "clean": "rm -rf dist",
31
+ "build:prod": "tsup src/index.ts --format esm --dts --clean --minify --treeshake"
32
+ },
33
+ "dependencies": {
34
+ "@danielsimonjr/mathts-core": "^0.1.4",
35
+ "typed-function": "^4.0.0"
36
+ },
37
+ "devDependencies": {
38
+ "@types/node": "^25.5.2",
39
+ "tsup": "^8.0.0",
40
+ "typescript": "^5.3.0",
41
+ "vitest": "^4.1.5"
42
+ },
43
+ "publishConfig": {
44
+ "access": "public"
45
+ },
46
+ "repository": {
47
+ "type": "git",
48
+ "url": "https://github.com/danielsimonjr/mathts",
49
+ "directory": "expression"
50
+ },
51
+ "keywords": [
52
+ "math",
53
+ "typescript",
54
+ "expression",
55
+ "parser",
56
+ "evaluator",
57
+ "compiler"
58
+ ]
59
+ }