We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7cb8ab commit f7e5116Copy full SHA for f7e5116
public/components/package/pannels/overview/overview.js
@@ -182,7 +182,9 @@ export class Overview {
182
} = await fetch(`/downloads/${name.replaceAll("/", "%2F")}`)
183
.then((value) => value.json());
184
185
- document.querySelector("#npm-stats .weekly-downloads").textContent = downloads ?? "N/A";
+ const numberFormat = new Intl.NumberFormat();
186
+
187
+ document.querySelector("#npm-stats .weekly-downloads").textContent = downloads ? numberFormat.format(downloads) : "N/A";
188
document.querySelector("#npm-stats .weekly-traffic").textContent = downloads ? prettyBytes(downloads * size) : "N/A";
189
}
190
0 commit comments