tree icon indicating copy to clipboard operation
tree copied to clipboard

Fix human readable output edge cases

Open james-antill opened this issue 4 years ago • 3 comments

james-antill avatar May 11 '20 21:05 james-antill

Thanks for the PR @james-antill. Can you please add a small test case for this?

Thanks

a8m avatar May 12 '20 15:05 a8m

I added testing, and realized you used KiB format not KB ... so I changed it over to base 10 and created formatBytesKiB(), as you can see that produces output like "1024K" ... if you prefer that, probably just ignore this PR.

james-antill avatar May 13 '20 00:05 james-antill

Would you consider, perhaps as an option, to include an additional letter i to get proper unambiguous binary/IEC notation (Ki, Mi, Gi etc)?

albertony avatar May 07 '21 14:05 albertony