avoidwork/filesize.js

filesize(1024, { base: 2, standard: 'jedec' }) does not return 1 KB

mil7 opened this issue · 2 comments

mil7 commented

Hi there,

since the update to v9.0.9 the legacy notation to base 2 does not work anymore. Instead

filesize(1024, { base: 2, standard: 'jedec' }) === filesize(1024, { base: 2, standard: 'iec' }) === 1 KiB

v9.0.8 worked. The regression #155 removes all "jedec" relating tests though. I believe that was more housekeeping than intended.

9.0.9 returned all of the tests from 8.0.0 branch

The previous tests barely covered the opposite case, so that was a big mistake.