Skip to content

Commit 58182d4

Browse files
committed
update caller to instantiate a NumberRange object and pass it down to readingsOutsideRange
1 parent 8b4fed3 commit 58182d4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/caller.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
const station = require('./data');
2+
const { NumberRange } = require('./number-range');
23
const readingsOutsideRange = require('./readings-outside-range');
34

45
const operatingPlan = { temperatureFloor: 50, temperatureCeiling: 55 };
5-
6+
const range = new NumberRange(operatingPlan.temperatureFloor, operatingPlan.temperatureCeiling);
67
const alerts = readingsOutsideRange(
78
station,
89
operatingPlan.temperatureFloor,
9-
operatingPlan.temperatureCeiling
10+
operatingPlan.temperatureCeiling,
11+
range
1012
);
1113

1214
console.log(alerts);

0 commit comments

Comments
 (0)