Skip to content

Commit b239e20

Browse files
committed
fixup: always integers, use underscores on numbers
1 parent f64df35 commit b239e20

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

workspaces/arborist/lib/packument-cache.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ class PackumentCache extends LRUCache {
3535
if (!p[sizeKey]) {
3636
return maxEntrySize + 1
3737
}
38-
if (p[sizeKey] < 10000) {
38+
if (p[sizeKey] < 10_000) {
3939
return p[sizeKey] * 2
4040
}
41-
if (p[sizeKey] < 1000000) {
42-
return p[sizeKey] * 1.5
41+
if (p[sizeKey] < 1_000_000) {
42+
return Math.floor(p[sizeKey] * 1.5)
4343
}
4444
// It is less beneficial to store a small amount of super large things
4545
// at the cost of all other packuments.

0 commit comments

Comments
 (0)