Skip to content

v9.0.0

Latest
Compare
Choose a tag to compare
@75lb 75lb released this 20 Jul 19:04
· 2 commits to master since this release

Whether this is a breaking change or not is debatable so it has been released as a major version just in case.

Non-breaking change since v8.2.1

These changes affect the output only, there are no changes to the API or minimum supported Node version (still v12.17).

  • Fixed an issue where precision and Intl formatting was not applied to small numbers. #15
  • Removed minimumFractionDigits from unit number formatting. This removes superfluous precision, some examples:
    • byteSize(1000).toString() now returns 1 kB instead of 1.0 kB, removing the superfluous one decimal place of precision.
    • byteSize(1500000, { precision: 5 }).toString() now returns 1.5 MB instead of 1.50000 MB, again removing superfluous precision.
    • However, byteSize(1500010, { precision: 5 }).toString() will return 1.50001 MB as there is meaningful, non-zero precision to display.