mirror of
https://git.sr.ht/~cadence/cloudtube
synced 2026-05-26 12:32:25 +00:00
Make VSCode type detection happier
This commit is contained in:
parent
cd7969973b
commit
ec9b0edadc
7 changed files with 13 additions and 1 deletions
|
|
@ -151,7 +151,7 @@ function preroundedCountToText(count) {
|
|||
for (const scale of [[1e9, "B"], [1e6, "M"], [1e3, "K"]]) {
|
||||
if (count >= scale[0]) {
|
||||
// YouTube returns 3 significant figures. At least it does for channels.
|
||||
const rounded = (count/scale[0]).toPrecision(3)
|
||||
const rounded = (count/+scale[0]).toPrecision(3)
|
||||
return `${rounded}${scale[1]}`
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue