Key Features of @usex/rule-engine
masterThe @usex/rule-engine provides several advanced capabilities for rule processing:
- JSONPath Support: Access nested properties within your data using
$.path.to.fieldsyntax. - 126+ Operators: A wide range of operators including Comparison, String, Numeric, Array, Date/Time, Type, Existence, Boolean, Pattern, and Persian-specific operators.
- Type Safety: Full TypeScript support utilizing generics for robust rule definitions.
- Builder Pattern: A fluent API available via
@usex/rule-engine-builderfor programmatic rule construction. - Async Support: All evaluation processes are Promise-based.
- Advanced Processing: Supports batch processing, rule introspection (analyzing rules for possible inputs), and data mutations before evaluation.
- Environment Agnostic: Works seamlessly in both Node.js and browser environments with zero dependencies in the core package.