Skip to content

Commit 2938db3

Browse files
author
Cache Hamm
committed
Upgrade dependencies
1 parent feeef17 commit 2938db3

29 files changed

+4094
-8506
lines changed

Diff for: examples/02-nested-boolean-logic.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ engine.addRule({
4444
}]
4545
}]
4646
},
47-
event: { // define the event to fire when the conditions evaluate truthy
47+
event: { // define the event to fire when the conditions evaluate truthy
4848
type: 'fouledOut',
4949
params: {
5050
message: 'Player has fouled out!'

Diff for: examples/04-fact-dependency.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ engine.addFact('employee-tenure', (params, almanac) => {
110110
// define fact(s) known at runtime
111111
facts = { accountId: 'washington' }
112112
engine
113-
.run(facts) // first run, using washington's facts
113+
.run(facts) // first run, using washington's facts
114114
.then(() => {
115115
facts = { accountId: 'jefferson' }
116116
return engine.run(facts) // second run, using jefferson's facts; facts & evaluation are independent of the first run

Diff for: examples/05-optimizing-runtime-with-fact-priorities.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ engine.addFact('account-information', (params, almanac) => {
6767
// this fact will not be evaluated, because the "date" fact will fail first
6868
console.log('Checking the "account-information" fact...') // this message will not appear
6969
return almanac.factValue('accountId')
70-
.then((accountId) => {
71-
return accountClient.getAccountInformation(accountId)
72-
})
70+
.then((accountId) => {
71+
return accountClient.getAccountInformation(accountId)
72+
})
7373
}, { priority: LOW })
7474

7575
/**

Diff for: examples/06-custom-operators.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ facts = {
9191
word: 'bacon'
9292
}
9393
engine
94-
.run(facts) // first run, using 'bacon'
94+
.run(facts) // first run, using 'bacon'
9595
.then(() => {
9696
facts = {
9797
word: 'antelope'

Diff for: examples/07-rule-chaining.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ engine
8282
// define fact(s) known at runtime
8383
facts = { accountId: 'washington', drinksOrangeJuice: true, enjoysVodka: true, isSociable: true }
8484
engine
85-
.run(facts) // first run, using washington's facts
85+
.run(facts) // first run, using washington's facts
8686
.then(() => {
8787
facts = { accountId: 'jefferson', drinksOrangeJuice: true, enjoysVodka: false, isSociable: true }
8888
return engine.run(facts) // second run, using jefferson's facts; facts & evaluation are independent of the first run

Diff for: examples/08-fact-comparison.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ let rule = {
3333
accountType: 'customer'
3434
},
3535

36-
operator: 'greaterThanInclusive', // >=
36+
operator: 'greaterThanInclusive', // >=
3737

3838
// "value" in this instance is an object containing a fact definition
3939
// fact helpers "path" and "params" are supported here as well
@@ -115,7 +115,7 @@ let userFacts = {
115115
facts = Object.assign({}, userFacts, productList)
116116

117117
engine
118-
.run(facts) // first run, user can afford a gift card
118+
.run(facts) // first run, user can afford a gift card
119119
.then(() => {
120120
// second run; a user that cannot afford a gift card
121121
userFacts = {

Diff for: examples/09-rule-results.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ engine.addRule({
3030
value: 3.5
3131
}]
3232
},
33-
event: { // define the event to fire when the conditions evaluate truthy
33+
event: { // define the event to fire when the conditions evaluate truthy
3434
type: 'honor-roll',
3535
params: {
3636
message: 'Student made the athletics honor-roll'
@@ -45,14 +45,14 @@ function render (message, ruleResult) {
4545
}
4646
// if rule failed, iterate over each failed condition to determine why the student didn't qualify for athletics honor roll
4747
let detail = ruleResult.conditions.all.filter(condition => !condition.result)
48-
.map(condition => {
49-
switch (condition.operator) {
50-
case 'equal':
51-
return `was not an ${condition.fact}`
52-
case 'greaterThanInclusive':
53-
return `${condition.fact} of ${condition.factResult} was too low`
54-
}
55-
}).join(' and ')
48+
.map(condition => {
49+
switch (condition.operator) {
50+
case 'equal':
51+
return `was not an ${condition.fact}`
52+
case 'greaterThanInclusive':
53+
return `${condition.fact} of ${condition.factResult} was too low`
54+
}
55+
}).join(' and ')
5656
console.log(`${message} ${detail}`.red)
5757
}
5858

0 commit comments

Comments
 (0)