feature: migration TS + eslint 10
This commit is contained in:
@@ -28,10 +28,7 @@ const dbConfig = {
|
||||
async function getYearsOnServer() {
|
||||
const res = await fetch(`${BASE_URL}/`);
|
||||
const html = await res.text();
|
||||
const years = [];
|
||||
for (const match of html.matchAll(/href="(\d{4})\/"/g)) {
|
||||
years.push(Number(match[1]));
|
||||
}
|
||||
const years = Array.from(html.matchAll(/href="(\d{4})\/"/g), match => Number(match[1]));
|
||||
return years.toSorted();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user