Refactoring: split 'Utils' into multiple files; fix some stray uppercase-method names

This commit is contained in:
Pieter Vander Vennet 2025-08-01 04:02:09 +02:00
parent 81be4db044
commit 3ec89826e4
97 changed files with 884 additions and 921 deletions

View file

@ -103,13 +103,13 @@ class StatsDownloader {
let page = 1
let allFeatures: ChangeSetData[] = []
const endDay = new Date(year, month - 1 /* Zero-indexed: 0 = january*/, day + 1)
const endDate = `${endDay.getFullYear()}-${Utils.TwoDigits(
const endDate = `${endDay.getFullYear()}-${Utils.twoDigits(
endDay.getMonth() + 1
)}-${Utils.TwoDigits(endDay.getDate())}`
)}-${Utils.twoDigits(endDay.getDate())}`
let url = this.urlTemplate
.replace(
"{start_date}",
year + "-" + Utils.TwoDigits(month) + "-" + Utils.TwoDigits(day)
year + "-" + Utils.twoDigits(month) + "-" + Utils.twoDigits(day)
)
.replace("{end_date}", endDate)
.replace("{page}", "" + page)
@ -142,7 +142,7 @@ class StatsDownloader {
}
url = result.next
}
allFeatures = Utils.NoNull(allFeatures)
allFeatures = Lists.noNull(allFeatures)
allFeatures.forEach((f) => {
f.properties = { ...f.properties, ...f.properties.metadata }
if (f.properties.editor.toLowerCase().indexOf("android") >= 0) {