Remove unused Bun.peek

This commit is contained in:
SukkaW
2024-06-03 11:56:11 +08:00
parent 6e32af4dc8
commit 7167be852f
8 changed files with 8 additions and 24 deletions

View File

@@ -21,7 +21,7 @@ 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())
.then(res => res.json() as any)
.then((userAgents: string[]) => userAgents.filter(ua => ua.startsWith('Mozilla/5.0 '))),
{
serializer: serializeArray,
@@ -61,7 +61,7 @@ const querySpeedtestApi = async (keyword: string): Promise<Array<string | null>>
retry: {
retries: 2
}
})).then(r => r.json()).then((data: Array<{ url: string }>) => data.reduce<string[]>(
})).then(r => r.json() as any).then((data: Array<{ url: string }>) => data.reduce<string[]>(
(prev, cur) => {
const hn = getHostname(cur.url, { detectIp: false });
if (hn) {