Package Installation
Install Rule Engine JS using your preferred package manager:Verify Installation
After installation, verify that the package is correctly installed:Import Methods
Rule Engine JS supports multiple import formats:- ES Modules (Recommended)
- CommonJS
- Browser (UMD)
TypeScript Support
Rule Engine JS includes TypeScript type definitions out of the box. No additional@types package is needed.
Browser Compatibility
Rule Engine JS works in all modern browsers that support ES6. For older browsers, use a transpiler like Babel.
Minimum Browser Versions
- Chrome: 60+
- Firefox: 60+
- Safari: 12+
- Edge: 79+
Browser Bundle
For browser usage, use the pre-built UMD bundle:Node.js Compatibility
Rule Engine JS supports Node.js versions 16 and above.
Minimum Node.js Versions
- Node.js: 16.x, 18.x, 20.x, 22.x+
- Recommended: 18.x or higher
Framework Integration
React
Works seamlessly with React applications. Use hooks for reactive rule evaluation.
Vue
Compatible with Vue 2 and Vue 3. Use computed properties for reactive rules.
Angular
Integrates with Angular services and dependency injection.
Express
Perfect for server-side validation and middleware logic.
Bundle Sizes
Rule Engine JS is designed to be lightweight:| Format | Size | Gzipped |
|---|---|---|
| ESM | ~45KB | ~12KB |
| UMD | ~48KB | ~13KB |
| UMD (minified) | ~22KB | ~8KB |
Development Dependencies
No additional dependencies are required for Rule Engine JS itself. However, for development you might want:Testing
Testing
TypeScript
TypeScript
Linting
Linting
