Skip to content

Commit 49e7cf7

Browse files
committed
chore: Normalise average daily downloads
1 parent 46c08af commit 49e7cf7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/docs/src/app/(pages)/stats/lib/versions.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,9 @@ export async function getVersions() {
248248
}
249249
}
250250
acc[line.date][line.package] = Object.fromEntries(
251-
Object.entries(line.downloads).sort(([, a], [, b]) => b - a)
251+
Object.entries(line.downloads)
252+
.sort(([, a], [, b]) => b - a)
253+
.map(([key, value]) => [key, Math.round(value / 7)]) // Normalise to average daily downloads
252254
)
253255
return acc
254256
},

0 commit comments

Comments
 (0)