5.0.1 • Published 1 month ago
@educorvi/rita v5.0.1
Rule It All (Rita)
JSON Schema for rule-based evaluation and an Typescript Implementation to evaluate it
Schema
The Schema is available in the schema-folder and has the id https://raw.githubusercontent.com/educorvi/rita/main/rita-core/src/schema/schema.json
.
Documentation on the schema can be found here.
Implementation
Data can be evaluated against rules. Example:
/** Rules */
import exampleRule from '../assets/example1.json';
/** Data */
import { exampleData } from '../assets/exampleData';
/** The Parser class is used to parse a JSON Ruleset and use it for evaluation */
import { Parser } from '@educorvi/rita';
/** Parse ruleset */
const ruleSet: Array<Rule> = Parser.parseRuleSet(exampleRule);
/** Check wether data fulfilles the first rule in the ruleSet */
const result: boolean = ruleSet[0].evaluate(exampleData);
Documentation
The documentation of the schema and the implementation can be found here: https://educorvi.github.io/rita/rita-core/docs/index.html
5.0.1
1 month ago
5.0.0
1 year ago
4.0.1
2 years ago
4.0.0
2 years ago
3.1.2
2 years ago
3.1.1
2 years ago
3.1.0
2 years ago
3.0.0
2 years ago
1.3.6
2 years ago
2.0.0
2 years ago
1.3.5
2 years ago
1.3.4
2 years ago
1.3.3
2 years ago
1.3.2
2 years ago
1.3.1
2 years ago
1.3.0
2 years ago
1.2.1
3 years ago
1.2.0
3 years ago
1.1.0
3 years ago
1.0.1
3 years ago
1.0.0
3 years ago
0.0.0-development
3 years ago