Closed afanasy closed 2 years ago
You've missed the change to base 10 by default.
i know opening issues is easy, but maybe ... read the readme.md first, or try it?
@avoidwork Thank you for taking time to provide the screenshots! I've been using the lib for years, and run into the problem while upgrading from 6.x to the latest 9.x version last week, and even reading the readme.md multiple times couldn't help to make sense of the new base 2/10/iec/jedec defaults. The point is filesize(1024) == '1.02 KiB'
is incorrect, meaning the defaults are wrong (I believe), because by any standard 1024 bytes are not 1.02 KiB but 1 KiB. Now I can't just bump the version to the latest (9.x), because it shows the wrong values (and I'm ok if it would show correct KiB values, instead of previous KB values, but it doesn't), so I ended up using 8.x.
@afanasy i think i understand your concern, however base10 vs base2 is not something i'm going to argue; it's also not a bug.
there's 3 groups for this "problem", the people that think it's always only base2, the ones that deal with advertising which is base10, and then the users. the first group is stuck in the past.
@afanasy you might benefit from using the partial application to keep your code on point. you could also open a PR to put it back to base2. i do not have a strong opinion, as imo affordance is more important than a single use case being "correct".
on version 9.0.1 (should be
1 KiB
). Thanks for the great lib!