@orkestrel/rater 0.0.11 → 0.0.13

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
@@ -17,22 +17,26 @@ npm install @orkestrel/rater
17
17
 
18
18
  ## Requirements
19
19
 
20
- - Node.js >= 24
21
- - ESM (`import`) and CommonJS (`require`) via the `exports` field
20
+ - Node.js >= 22.12.0
21
+ - ESM (`import`) and CommonJS (`require`) through the `exports` field
22
22
 
23
23
  ## Usage
24
24
 
25
25
  ```ts
26
- import { createRater, lineDefinition } from '@orkestrel/rater'
27
- import { factorGroup, quantitativeDefinition, staticFactor } from '@orkestrel/reason'
26
+ import { buildLineDefinition, createRater } from '@orkestrel/rater'
27
+ import {
28
+ createFactorGroup,
29
+ createQuantitativeDefinition,
30
+ createStaticFactor,
31
+ } from '@orkestrel/reason'
28
32
 
29
33
  const rater = createRater()
30
34
 
31
- const base = lineDefinition(
35
+ const base = buildLineDefinition(
32
36
  'base',
33
37
  'Base Amount',
34
- quantitativeDefinition('base', 'Base', [
35
- factorGroup('amount', 'sum', [staticFactor('flat', 100)]),
38
+ createQuantitativeDefinition('base', 'Base', [
39
+ createFactorGroup('amount', 'sum', [createStaticFactor('flat', 100)]),
36
40
  ]),
37
41
  )
38
42
 
@@ -53,7 +57,7 @@ through `rater.emitter` (`rate`).
53
57
 
54
58
  For the full surface — `Rater`, `RatingResult`, worksheet types, validators,
55
59
  factories, errors, and options — see
56
- [`guides/src/rater.md`](guides/src/rater.md).
60
+ [`guides/rater.md`](guides/rater.md).
57
61
 
58
62
  ## Package
59
63