0.0.1 • Published 10 years ago

jbrules v0.0.1

Weekly downloads
1
License
-
Repository
-
Last release
10 years ago

JBRules

What is JBRules?

JBRules is a simple forward chaining Business Rules Engine (BRE)

JSON Rules

JBRules uses JSON rules. Rules consist of a descriptive name, one or more conditions and one or more consequences. JBRules allows for very expressive rules, take for example the following:

{
  "name": "Say hello to Pablo",
  "condition": 
    function(name) {
      return name == "Pablo";
    }
  ,
  "consequence": 
    function(name) {
      console.log("Hello " + name);
    }
}

Provided the following fact, the rule would output "Hello Pablo" to the console:

{
  "name": "Pablo",
  "email": "pablovilas89@gmail.com"
}
0.0.1

10 years ago