@orkestrel/qualifier 0.0.12 → 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/qualifier
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 { createQualifier, qualificationDefinition, rulingDefinition } from '@orkestrel/qualifier'
27
- import { atom, logicalDefinition, rule } from '@orkestrel/reason'
28
-
29
- const gates = logicalDefinition('gates', 'Eligibility gates', [
30
- rule('licensed', [atom('licensed', 'equals', false)], atom('blocked', 'equals', true)),
26
+ import { createQualificationDefinition, createQualifier, createRuling } from '@orkestrel/qualifier'
27
+ import { createAtom, createLogicalDefinition, createRule } from '@orkestrel/reason'
28
+
29
+ const gates = createLogicalDefinition('gates', 'Eligibility gates', [
30
+ createRule(
31
+ 'licensed',
32
+ [createAtom('licensed', 'equals', false)],
33
+ createAtom('blocked', 'equals', true),
34
+ ),
31
35
  ])
32
36
 
33
- const definition = qualificationDefinition('standard', 'Standard eligibility', [gates], {
37
+ const definition = createQualificationDefinition('standard', 'Standard eligibility', [gates], {
34
38
  rulings: [
35
- rulingDefinition('license', 'gates', 'licensed', 'restriction', {
39
+ createRuling('license', 'gates', 'licensed', 'restriction', {
36
40
  message: 'A license is required',
37
41
  }),
38
42
  ],
@@ -55,7 +59,7 @@ overload. Every `qualify` call fires once through `qualifier.emitter` (`qualify`
55
59
 
56
60
  For the full surface — `Qualifier`, `QualificationResult`, finding types, validators,
57
61
  factories, errors, and options — see
58
- [`guides/src/qualifier.md`](guides/src/qualifier.md).
62
+ [`guides/qualifier.md`](guides/qualifier.md).
59
63
 
60
64
  ## Package
61
65