Skip to content

Commit

Permalink
fixup: always integers, use underscores on numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
wraithgar committed May 7, 2024
1 parent f64df35 commit b239e20
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions workspaces/arborist/lib/packument-cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ class PackumentCache extends LRUCache {
if (!p[sizeKey]) {
return maxEntrySize + 1
}
if (p[sizeKey] < 10000) {
if (p[sizeKey] < 10_000) {
return p[sizeKey] * 2
}
if (p[sizeKey] < 1000000) {
return p[sizeKey] * 1.5
if (p[sizeKey] < 1_000_000) {
return Math.floor(p[sizeKey] * 1.5)
}
// It is less beneficial to store a small amount of super large things
// at the cost of all other packuments.
Expand Down

0 comments on commit b239e20

Please sign in to comment.