tsch-ej-numbers
Version:
API for analyzing EuroJackpot lottery numbers, trends, and probabilities.
32 lines (31 loc) • 1.01 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.handleGetLowHighCount = handleGetLowHighCount;
var __1 = require("..");
function handleGetLowHighCount() {
var data = (0, __1.getRecords)();
var countLow = 0;
var countHigh = 0;
data.forEach(function (item) {
// low 1 (1 - 25)
if ((item.wn1 > 0 && item.wn1 <= 25) ||
(item.wn2 > 0 && item.wn2 <= 25) ||
(item.wn3 > 0 && item.wn3 <= 25) ||
(item.wn4 > 0 && item.wn4 <= 25) ||
(item.wn5 > 0 && item.wn5 <= 25)) {
countLow += 1;
}
// high 2 (26 - 50)
if ((item.wn1 > 25 && item.wn1 <= 50) ||
(item.wn2 > 25 && item.wn2 <= 50) ||
(item.wn3 > 25 && item.wn3 <= 50) ||
(item.wn4 > 25 && item.wn4 <= 50) ||
(item.wn5 > 25 && item.wn5 <= 50)) {
countHigh += 1;
}
});
return {
countLow: countLow,
countHigh: countHigh,
};
}