Skip to content

Commit d6e4557

Browse files
authored
Update walkthrough.md
walkthrough add rule tweak
1 parent 3fc3aaa commit d6e4557

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

docs/walkthrough.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
## Step 1: Create an Engine
1010

1111
```js
12-
let RuleEngine = require('json-rules-engine');
13-
let engine = new RuleEngine.Engine();
12+
let { Engine } = require('json-rules-engine');
13+
let engine = new Engine();
1414
```
1515

1616
More on engines can be found [here](./engine.md)
@@ -59,8 +59,7 @@ let conditions = {
5959
}
6060
]
6161
};
62-
let rule = new RuleEngine.Rule({ conditions, event});
63-
engine.addRule(rule);
62+
engine.addRule({ conditions, event });
6463
```
6564

6665
The example above demonstrates a rule for finding individuals between _18 and 25_ who live in either _Utah or Colorado_.

0 commit comments

Comments
 (0)