Lightweight Rules Engine in Javascript

Philippe Monnet picture Philippe Monnet · Aug 7, 2010 · Viewed 37.4k times · Source

I am looking for suggestions for a lightweight rules engine implemented in Javascript.

The reason for such an implementation is to build a very lightweight but fast browser-based simulation using a small set of rules (less than 20). The simulation would take half a dozen parameters and run the rules and display results in the browser without any need to go back to the server. Think of a UI with a couple radio buttons, checkboxes, text boxes and sliders to control the parameters. The simulation would quickly re-run based on any parameter change.

Answer

dearwish picture dearwish · Oct 25, 2012

Checkout the nools rule engine implemented in pure JavaScript for node.js. It has a pretty straightforward syntax for rules definitions.