Minor Changes + Housekeeping

This commit is contained in:
SukkaW
2024-07-02 10:50:09 +08:00
parent b325f31990
commit dda0555c0b
8 changed files with 34 additions and 67 deletions

View File

@@ -20,8 +20,8 @@ const s = new Sema(2);
const latestTopUserAgentsPromise = fsFetchCache.apply(
'https://cdn.jsdelivr.net/npm/top-user-agents@latest/src/desktop.json',
() => fetchWithRetry('https://cdn.jsdelivr.net/npm/top-user-agents@latest/src/desktop.json')
.then(res => res.json() as any)
.then((userAgents: string[]) => userAgents.filter(ua => ua.startsWith('Mozilla/5.0 '))),
.then(res => res.json() as Promise<string[]>)
.then((userAgents) => userAgents.filter(ua => ua.startsWith('Mozilla/5.0 '))),
{
serializer: serializeArray,
deserializer: deserializeArray,