davefollett
Repos
18
Followers
31
Following
1

Events

Created at 1 month ago
issue comment
abbreviate numbers like GitHub: 2,052 -> 2.1k

Don't want to nit pick but, once the star value crosses over 100,000 the tenth place is rounded off it appears. FreeCodeCamp has 343834 stars but displays 344k. Replacing https://github.com/swharden/repo-badge/blob/main/docs/badge.js#L78 with this:

let thousand = 0
if (value < 100000) {
  thousand = Math.round(value / 100) / 10;
} else {
  thousand = Math.round(value / 100 / 10);
}
Created at 2 months ago
issue comment
abbreviate numbers like GitHub: 2,052 -> 2.1k

Wonder what happens at a million stars? If only GitHub itself was open sourced.

Created at 2 months ago