defaultRulesEngineProcessorNodeRules
constdefaultRulesEngineProcessorNodeRules:RulesEngineProcessor<NodeRule[]>
Defined in: rules-engine/src/utils/formatRulesEngine/defaultRulesEngineProcessorNodeRules.ts:31
Default processor for the "node-rules" export format. Returns an array of live
node-rules Rule objects with real
condition/consequence functions—ready to pass to new RuleEngine(...) or register(...).
Antecedents are compiled to predicates (shared with the "native" target) so evaluation needs no
operator registration. Each fired condition's consequent is pushed onto fact.events (mirroring
the json-rules-engine result shape).
Sibling/ancestor relationships and the evaluationMode are baked into each rule's guard, so every
rule simply continues with R.next(); cascade vs. cumulative semantics fall out of the shared
walk.
Example
const R = new RuleEngine(formatRulesEngine(re, 'node-rules'));
R.execute({ experience: 12 }, ({ events }) => console.log(events));
API documentation is generated from the latest commit on the main branch. It may be somewhat inconsistent with official releases of React Query Builder.