This code
console.log({
size,
def: prettyBytes(size),
max: prettyBytes(size, { maximumFractionDigits: 1 }),
minMax: prettyBytes(size, {
maximumFractionDigits: 1,
minimumFractionDigits: 1,
}),
});
Results in following output:
{"def": "60 MB", "max": "59.952784 MB", "minMax": "59.952784 MB", "size": 59952784}
I expect that both max
and minMax
should be 59.9 MB
.
I'm using pretty-bytes@^5.6.0
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too