Closed rolandstarke closed 2 years ago
It does work like the README.md says, the first option (base) has a default of 10. I've removed the outdated examples to remove confusion.
This is probably what you're looking for: https://github.com/avoidwork/filesize.js#partial-application
Thanks for removing the confusion from the README.md.
I don't care about the default base change. I actually want base 10.
My only complaint is that there is an i
in the unit, but i
indicates base 2.
I am looking for using the SI prefix for base 10. See https://wiki.ubuntu.com/UnitsPolicy or https://en.m.wikipedia.org/wiki/Byte#Multiple-byte_units Releates: https://github.com/avoidwork/filesize.js/issues/141, https://github.com/avoidwork/filesize.js/issues/150#issuecomment-1153093374 v2.0.0 to v8.0.7 supported it.
totally agree. 9.0.0 shifted it because https://github.com/avoidwork/filesize.js/issues/152 is the cause of the regression.
there's 2 camps which do not agree on how it works. I'll return the original behavior.
This is 9.0.9.
The Readme has an example of:
But the actual output is:
Would be cool if it worked like in the Readme. Also see: https://github.com/avoidwork/filesize.js/issues/150
For Anyone else you can use v8.0.7