Skip to content

Commit e47aa82

Browse files
committed
counting number of keys for size
1 parent 6f1453c commit e47aa82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

expensive-keys.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
}
2121

2222
function keySize(items, key) {
23-
return stringSize(key) + objectSize(pickValue(key, items));
23+
return stringSize(key) * items.length + objectSize(pickValue(key, items));
2424
}
2525

2626
function zip(keys, values) {

0 commit comments

Comments
 (0)