standard='iec' is not default anymore
zerkms opened this issue · 2 comments
zerkms commented
The check is defined as:
standard = base === 2 ? descriptor.standard || "iec" : "jedec";
Which reads - if only base
equals 2 - take the descriptor.standard
. But base
default value is 10.
Hence
filesize(265318, { standard: 'iec' });
would output "265.32 kB"
So it means:
- The readme is not entirely correct in its "(string) Standard unit of measure, can be iec or jedec, default is iec; can be overruled by base"
standard
option does nothing ifbase
is not specified
avoidwork commented
yup, this is what people wanted for the last major release. i believe it was a mistake.