Skip to content

Commit 35b4f79

Browse files
author
Emmanuel
committed
update readme
1 parent cc5f4da commit 35b4f79

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ With it, you configure:
1111
* a set of rules to find the objects according to the filters configuration
1212
* a set of objects to play with
1313

14-
once configured, you can start the filtering process so that JamRules selects the objects that match your criteria and calls a 'selected' and a 'not selected' functions on each of them.
14+
Once configured, you can start the filtering process so that JamRules selects the objects that match your criteria and calls a 'selected' function on each of them, and call a 'not selected' function for the others...
1515

1616
![alt JamRules designed for the selection of objects](https://cloud.githubusercontent.com/assets/1048488/24730721/91d34c04-1a65-11e7-8fb8-9e47dec60691.jpg)
1717

@@ -21,7 +21,7 @@ As an object filter library, Jamrules is your best friend! Ideal for product con
2121

2222
[See JamRules in action](https://demo.intersel.fr/jamrules/tests/filterDocs.html) (source code in test/filterDocs.html)
2323

24-
# Get started with an example...
24+
# How it works...
2525
To run jamrules, you will have to:
2626
* create a jamrules object,
2727
* define the filter configuration
@@ -46,7 +46,7 @@ Some of the properties may be used in the filtering configuration to select the
4646

4747
Your objects needs to have a json definition, eg. :
4848

49-
```json
49+
```javascript
5050
let myobjects = [
5151
{
5252
"type":"mammal",
@@ -58,14 +58,15 @@ let myobjects = [
5858
"name":"dog",
5959
"color":"white"
6060
},
61-
...]
61+
//and so on
62+
]
6263
```
6364

6465
Your objects may not have the same set of properties... Up to you to define in your rules how to select or not your objects...
6566

6667
## Add objects
6768

68-
Use the function addPropertyObjects of your rulesEngine to add your objects and the behavior of the selected and not selected objects by jamRules:
69+
Use the function **addPropertyObjects** of your rules engine to add your objects and the behavior of the selected and not selected objects by jamRules:
6970

7071
```javascript
7172
rulesEngine.addPropertyObjects(
@@ -81,7 +82,7 @@ Generally, the filtering configuration is driven by the status of checkboxes, ra
8182

8283
For example, for the property "color", you could set several checkboxes, each allowing to select a color as "red", "blue", "green", ...
8384

84-
To configure the configurator, we use the function 'rulesEngine.selectConfigurationPropertyValue'.
85+
To configure the property values of the configurator, we use the function **selectConfigurationPropertyValue**.
8586

8687
```html
8788
<label for="check_green" onclick="rulesEngine.selectConfigurationPropertyValue("color","green",$(this).children('input').value());">
@@ -118,7 +119,7 @@ rulesEngine.createRulesSet("HasGreenColor");
118119

119120
## Test your objects against the rules...
120121

121-
Once done, we will be able to run our jamrules engine with rulesEngine.runRulesEngine:
122+
Once done, we will be able to run our jamrules engine with **runRulesEngine**:
122123

123124
```Javascript
124125
rulesEngine.runRulesEngine();

0 commit comments

Comments
 (0)