Closed ussuritiger closed 7 years ago
all this time, i thought no one used that flag. looks like it doesn't +1 when it should. i'll take a look.
Apparently there are people who use this flag :) Moreover, it is hard to find a library that operates with bits. So this makes the library even greater. Keep up the good work and thanks for the quick response.
I am using the 3.4.2 version of package. I've got an issue while formatting bits. Please see the code and the output below.
filesize(124, {bits: true, base: 10}) // "992 b"
filesize(125, {bits: true, base: 10}) // "1000 b" => I would expect "1 kb"
filesize(126, {bits: true, base: 10}) // "1.01 kb"
Same goes for other thousands:
filesize(125000, {bits: true, base: 10}) // "1000 kb" => I would expect "1 Mb"
filesize(125000000, {bits: true, base: 10}) // "1000 Mb" => I would expect "1 Gb"
Hope it does not require much time to fix this. Thank you.