How rxnt/json-rules-engine-simplified works
This is a small JSON rules-engine library. A caller supplies rules and form data to Engine; Engine optionally validates rules against a schema, evaluates conditions, and resolves matching events. Boolean and field predicates perform the condition checks, while utilities support nested-field access and schema references. The map reflects the sampled runtime sources and README; it does not infer event handling beyond returning matched event objects.
Main entry points: Engine.js Engine · conditionsMeet.js Condition Evaluator · validation.js Rule Validation · applicableActions.js Applicable Actions
Components 12
Engine API
- Engine
src/Engine.js - Public Export
src/index.js
Rule Evaluation
- Applicable Actions
src/applicableActions.js - Condition Evaluator
src/conditionsMeet.js - Field Predicates
src/checkField.js
Validation And Utilities
- Rule Validation
src/validation.js - Shared Utilities
src/utils.js - Boolean Operators
src/constants.js
Other components
- Library Caller
- Predicate Library
- Nested Field Access
- Matched Events
Connections 18
- Library Caller → Public Export: imports
src/index.js - Public Export → Engine: exports
src/index.js - Library Caller → Engine: supplies rules
README.md - Library Caller → Engine: runs with data
README.md - Engine → Rule Validation: validates rules
src/Engine.js - Engine → Applicable Actions: evaluates rules
src/Engine.js - Applicable Actions → Condition Evaluator: checks conditions
src/applicableActions.js - Condition Evaluator → Field Predicates: checks field
src/conditionsMeet.js - Condition Evaluator → Shared Utilities: resolves fields
src/conditionsMeet.js - Field Predicates → Predicate Library: invokes predicates
src/checkField.js - Condition Evaluator → Boolean Operators: uses operators
src/conditionsMeet.js - Field Predicates → Boolean Operators: uses operators
src/checkField.js - Rule Validation → Shared Utilities: uses schema helpers
src/validation.js - Rule Validation → Boolean Operators: uses operators
src/validation.js - Rule Validation → Predicate Library: checks predicate names
src/validation.js - Shared Utilities → Nested Field Access: selects nested fields
src/utils.js - Applicable Actions → Matched Events: returns matches
src/applicableActions.js - Engine → Library Caller: resolves events
src/Engine.js