@axi-engine/expressions 0.2.4 → 0.2.5

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 +3 -3
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -25,7 +25,7 @@ npm install @axi-engine/expressions
25
25
  - **`DataSource`**: A simple interface (`{ get(path), has(path) }`) that provides the data against which expressions are evaluated. This can be your game's state manager, a local scope, or any other data source.
26
26
  - **`ExpressionEvaluator`**: The main class that takes an `Expression` and a `DataSource` and resolves them to a boolean result.
27
27
 
28
- ## Basic Usage
28
+ ## Usage
29
29
 
30
30
  Here's how to set up the evaluator and resolve a simple expression.
31
31
 
@@ -34,8 +34,8 @@ import { createExpressionEvaluator } from '@axi-engine/expressions';
34
34
  import type { Expression } from '@axi-engine/expressions';
35
35
  import type { DataSource } from '@axi-engine/utils';
36
36
 
37
- // 1. Create the evaluator (it comes with all core handlers pre-registered)
38
- const evaluator = createExpressionEvaluator();
37
+ // 1. Use the builder to create an CoreExpressionEvaluator.
38
+ const evaluator = configureExpressions().withDefaults().build();
39
39
 
40
40
  // 2. Define a data source that provides the state
41
41
  const myGameDataSource: DataSource = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axi-engine/expressions",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -26,16 +26,16 @@
26
26
  "scripts": {
27
27
  "build": "tsup",
28
28
  "prebuild": "npm test",
29
- "test": "vitest run --root ../../ src/",
29
+ "test": "vitest run",
30
30
  "docs": "typedoc src/index.ts --out docs/api --options ../../typedoc.json"
31
31
  },
32
32
  "files": [
33
33
  "dist"
34
34
  ],
35
35
  "devDependencies": {
36
- "@axi-engine/utils": "^0.2.6"
36
+ "@axi-engine/utils": "^0.2.10"
37
37
  },
38
38
  "peerDependencies": {
39
- "@axi-engine/utils": "^0.2.6"
39
+ "@axi-engine/utils": "^0.2.10"
40
40
  }
41
41
  }