UNPKG

tsch-ej-numbers

Version:

A powerful TypeScript API for analyzing EuroJackpot draws. Perfect for developers who want to evaluate historical data, generate statistics, or build lottery-related applications.

32 lines (31 loc) 1.01 kB
"use strict"; 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, }; }