Can refactor by abstracting methods to improve readability
adriangohjw opened this issue · comments
Adrian Goh Jun Wei commented
Lines 21 to 30 in e1d6fb3
if (!datesAreOnSameDay(dateNow, dateStored)) {
let scrape = await scrapeTime();
updateJSONTime(dateNow, scrape.subuhTime, scrape.maghribTime);
}
[maghribTime, subuhTime] = getStoredTimings();
//...
// abstracted function for readability
function getStoredTimings() {
return [data.maghribTime, data.subuhTime]
}
shaikzhafir commented
no